Skip to content

Commit

Permalink
Boolean.toInt
Browse files Browse the repository at this point in the history
  • Loading branch information
pshirshov committed Jun 27, 2024
1 parent c8f30ff commit 55839fb
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ trait IzBoolean {
object IzBoolean extends IzBoolean {
@inline final implicit class LazyBool(private val b: () => Boolean) extends AnyVal {
@inline def value: Boolean = b()
@inline def toInt: Int = if (b()) 1 else 0
}
}

0 comments on commit 55839fb

Please sign in to comment.