Skip to content

Commit

Permalink
Merge pull request #60 from isaacl/addFutureVoid
Browse files Browse the repository at this point in the history
Add Future.discard extension method
  • Loading branch information
ornicar authored Sep 24, 2024
2 parents 6312ee3 + 2c34d60 commit 0c4183f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lila/src/main/scala/future.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ object extensions:
inline def void: Future[Unit] =
fua.dmap(_ => ())

inline def discard: Unit = ()

inline infix def inject[B](b: => B): Future[B] =
fua.dmap(_ => b)

Expand Down

0 comments on commit 0c4183f

Please sign in to comment.