Skip to content

Commit c4ce3fa

Browse files
Use AnyVal to avoid allocations
Co-authored-by: Arman Bilge <armanbilge@gmail.com>
1 parent ac8a339 commit c4ce3fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/scala/cats/mtl/Handle.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ object Handle extends HandleInstances with HandleVariant {
230230
def apply[A](body: Handle[F, E] => F[A])(implicit F: ApplicativeThrow[F]): Inner[A] =
231231
new Inner(body)
232232

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

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

0 commit comments

Comments
 (0)