Skip to content

Commit

Permalink
Merge pull request #4162 from iRevive/io-async-unit
Browse files Browse the repository at this point in the history
Use `IO.unit` in `Async[IO].unit`
  • Loading branch information
djspiewak authored Oct 31, 2024
2 parents ef28cf9 + c687233 commit 211e8d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/shared/src/main/scala/cats/effect/IO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 211e8d5

Please sign in to comment.