Skip to content

Commit

Permalink
Use AnyVal to avoid allocations
Browse files Browse the repository at this point in the history
Co-authored-by: Arman Bilge <[email protected]>
  • Loading branch information
lenguyenthanh and armanbilge authored Mar 7, 2025
1 parent ac8a339 commit c4ce3fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/scala/cats/mtl/Handle.scala
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ object Handle extends HandleInstances with HandleVariant {
def apply[A](body: Handle[F, E] => F[A])(implicit F: ApplicativeThrow[F]): Inner[A] =
new Inner(body)

final class Inner[A](body: Handle[F, E] => F[A])(implicit F: ApplicativeThrow[F]) {
def rescue(h: E => F[A]): F[A] = {
final class Inner[A](private val body: Handle[F, E] => F[A]) extends AnyVal {
def rescue(h: E => F[A])(implicit F: ApplicativeThrow[F]): F[A] = {
val Marker = new AnyRef

def inner[B](fb: F[B])(f: E => F[B]): F[B] =
Expand Down

0 comments on commit c4ce3fa

Please sign in to comment.