diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index bdef5c1e71..b23ca96ca8 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -24,3 +24,6 @@ fa1afb9141016bf6f72896b9867a9bcba3cb2933 # Scala Steward: Reformat with scalafmt 3.10.4 ae82658f87735451df5230ca089b12c25b59c700 + +# Scala Steward: Reformat with scalafmt 3.11.2 +02b049c4c9bbd2e275721e182a21932cba143ed4 diff --git a/.scalafmt.conf b/.scalafmt.conf index a0a86d33e7..65625080f7 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.11.0 +version = 3.11.2 runner.dialect = Scala213Source3 fileOverride { diff --git a/tests/shared/src/test/scala/cats/effect/std/DispatcherSuite.scala b/tests/shared/src/test/scala/cats/effect/std/DispatcherSuite.scala index 70a6ba24bd..1402960acd 100644 --- a/tests/shared/src/test/scala/cats/effect/std/DispatcherSuite.scala +++ b/tests/shared/src/test/scala/cats/effect/std/DispatcherSuite.scala @@ -77,19 +77,21 @@ class DispatcherSuite extends BaseSuite with DetectPlatform { D.use { dispatcher => IO.ref(0).flatMap { ctr1 => IO.ref(0).flatMap { ctr2 => - IO.fromFuture(IO { - val (_, cancel) = dispatcher.unsafeToFutureCancelable(IO.uncancelable { _ => - ctr1.update(_ + 1) *> IO.sleep(0.1.second) *> ctr2.update(_ + 1) + IO.fromFuture( + IO { + val (_, cancel) = dispatcher.unsafeToFutureCancelable(IO.uncancelable { _ => + ctr1.update(_ + 1) *> IO.sleep(0.1.second) *> ctr2.update(_ + 1) + }) + val cancelFut = cancel() + cancelFut }) - val cancelFut = cancel() - cancelFut - }).flatMap { _ => - // if we're here, `cancel()` finished, so - // either the task didn't run at all (i.e., - // it was cancelled before starting), or - // it ran and already finished completely: - (ctr1.get, ctr2.get).flatMapN { (v1, v2) => IO(assertEquals(v1, v2)) } - } + .flatMap { _ => + // if we're here, `cancel()` finished, so + // either the task didn't run at all (i.e., + // it was cancelled before starting), or + // it ran and already finished completely: + (ctr1.get, ctr2.get).flatMapN { (v1, v2) => IO(assertEquals(v1, v2)) } + } } } }.replicateA_(if (isJVM) 10000 else 1) @@ -594,11 +596,12 @@ class DispatcherSuite extends BaseSuite with DetectPlatform { real("complete / cancel race") { val tsk = dispatcher.use { dispatcher => - IO.fromFuture(IO { - val (_, cancel) = dispatcher.unsafeToFutureCancelable(IO.unit) - val cancelFut = cancel() - cancelFut - }) + IO.fromFuture( + IO { + val (_, cancel) = dispatcher.unsafeToFutureCancelable(IO.unit) + val cancelFut = cancel() + cancelFut + }) } tsk.replicateA_(if (isJVM) 10000 else 1)