Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragge-dev committed Apr 6, 2024
1 parent 1fde620 commit 518a928
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions result/src/main/scala/io/github/ragazoor/IO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ sealed trait IO[+E <: Throwable, +A] extends Awaitable[A] {
def mapError[E2 <: Throwable](f: E => E2)(implicit ec: ExecutionContext): IO[E2, A] = {
var isFutureFatal = isFatal
val transformedFuture = self.toFuture.transform {
case Failure(e) if NonFatal(e) && !isFatal => Failure(f(e.asInstanceOf[E]))
case Failure(e) if NonFatal(e) && !isFatal => Failure(f(e.asInstanceOf[E]))
case Failure(e) if !NonFatal(e) || isFatal =>
isFutureFatal = true
Failure(e)
case success => success
case success => success
}
IO[E2, A](transformedFuture, isFutureFatal)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package io.github.ragazoor
import io.github.ragazoor.implicits._
import munit.FunSuite

import scala.concurrent.{Future => StdFuture}
import scala.concurrent.{ Future => StdFuture }

class FutureToIOSpec extends FunSuite {

Expand Down

0 comments on commit 518a928

Please sign in to comment.