diff --git a/core/src/main/scala/cats/instances/option.scala b/core/src/main/scala/cats/instances/option.scala index 0b3db11d05..86d8ec7e1d 100644 --- a/core/src/main/scala/cats/instances/option.scala +++ b/core/src/main/scala/cats/instances/option.scala @@ -285,12 +285,11 @@ private[instances] trait OptionInstancesBinCompat0 { case Some(a) => G.map(f(a))(b => if (b) Some(a) else None) } - override def mapAccumulateFilter[S, A, B](init: S, fa: Option[A])(f: (S, A) => (S, Option[B])): (S, Option[B]) = { + override def mapAccumulateFilter[S, A, B](init: S, fa: Option[A])(f: (S, A) => (S, Option[B])): (S, Option[B]) = fa match { case Some(a) => f(init, a) - case None => (init, None) + case None => (init, None) } - } } }