Skip to content

Commit

Permalink
Remove unapply from UnsafeNonFatal
Browse files Browse the repository at this point in the history
  • Loading branch information
kapunga committed Feb 11, 2025
1 parent 24bae8b commit d4ba299
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,4 @@ private[effect] object UnsafeNonFatal {
false
case _ => true
}

/**
* Returns Some(t) if UnsafeNonFatal(t) == true, otherwise None
*
* Implementation does not use a filtered Option, as if there is some FatalError such as
* OutOfMemory, there might have trouble allocating an additional `Some` instance.
*/
def unapply(t: Throwable): Option[Throwable] = if (apply(t)) Some(t) else None
}

0 comments on commit d4ba299

Please sign in to comment.