From c6872335a957f9c6937a49cc3de8579965b526b4 Mon Sep 17 00:00:00 2001 From: Maksym Ochenashko Date: Thu, 31 Oct 2024 09:04:51 +0200 Subject: [PATCH] IO: override `def unit` in `Async[IO]` --- core/shared/src/main/scala/cats/effect/IO.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/shared/src/main/scala/cats/effect/IO.scala b/core/shared/src/main/scala/cats/effect/IO.scala index ee95addc6a..a798aa2e4e 100644 --- a/core/shared/src/main/scala/cats/effect/IO.scala +++ b/core/shared/src/main/scala/cats/effect/IO.scala @@ -1986,6 +1986,9 @@ object IO extends IOCompanionPlatform with IOLowPriorityImplicits with TuplePara def pure[A](x: A): IO[A] = IO.pure(x) + override def unit: IO[Unit] = + IO.unit + override def guarantee[A](fa: IO[A], fin: IO[Unit]): IO[A] = fa.guarantee(fin)