Skip to content

Commit

Permalink
Merge pull request #4101 from satorg/update/scalafmt-core-3.3.0
Browse files Browse the repository at this point in the history
Update scalafmt-core to 3.3.0
  • Loading branch information
satorg authored Jan 2, 2022
2 parents 9922dac + 2c4b629 commit 7ce35f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3.2.1
version=3.3.0
align.openParenCallSite = true
align.openParenDefnSite = true
maxColumn = 120
Expand Down
8 changes: 5 additions & 3 deletions core/src/main/scala/cats/instances/try.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ trait TryInstances extends TryInstances1 {
ta match { case Success(a) => Try(map(a)); case Failure(e) => Try(recover(e)) }

override def redeemWith[A, B](ta: Try[A])(recover: Throwable => Try[B], bind: A => Try[B]): Try[B] =
try ta match {
case Success(a) => bind(a); case Failure(e) => recover(e)
} catch { case NonFatal(e) => Failure(e) }
try
ta match {
case Success(a) => bind(a); case Failure(e) => recover(e)
}
catch { case NonFatal(e) => Failure(e) }

override def recover[A](ta: Try[A])(pf: PartialFunction[Throwable, A]): Try[A] =
ta.recover(pf)
Expand Down

0 comments on commit 7ce35f5

Please sign in to comment.