From 279fc23dcc480e70ea0be1b2bdf550e422189ca2 Mon Sep 17 00:00:00 2001 From: Kamil Kloch Date: Mon, 11 Sep 2023 17:00:41 +0200 Subject: [PATCH] Cosmetics. --- .../src/main/scala/cats/effect/std/Dispatcher.scala | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/std/shared/src/main/scala/cats/effect/std/Dispatcher.scala b/std/shared/src/main/scala/cats/effect/std/Dispatcher.scala index 3937f9b1bc..943aa74889 100644 --- a/std/shared/src/main/scala/cats/effect/std/Dispatcher.scala +++ b/std/shared/src/main/scala/cats/effect/std/Dispatcher.scala @@ -70,17 +70,15 @@ trait Dispatcher[F[_]] extends DispatcherPlatform[F] { * Submits an effect to be executed with fire-and-forget semantics. */ def unsafeRunAndForget[A](fa: F[A]): Unit = - unsafeToFutureCancelable(fa) - ._1 - .onComplete { - case Failure(ex) => ex.printStackTrace() - case _ => () - }(parasiticEC) + unsafeToFuture(fa).onComplete { + case Failure(ex) => ex.printStackTrace() + case _ => () + }(parasiticEC) // package-private because it's just an internal utility which supports specific implementations // anyone who needs this type of thing should use unsafeToFuture and then onComplete private[std] def unsafeRunAsync[A](fa: F[A])(cb: Either[Throwable, A] => Unit): Unit = - unsafeToFutureCancelable(fa)._1.onComplete(t => cb(t.toEither))(parasiticEC) + unsafeToFuture(fa).onComplete(t => cb(t.toEither))(parasiticEC) } object Dispatcher {