ignore discarded Unit

This commit is contained in:
Adrien Piquerez 2023-11-16 17:00:05 +01:00
parent b6510a1c1c
commit 99385881f0
1 changed files with 4 additions and 2 deletions

View File

@ -39,8 +39,10 @@ object Util {
def quoteIfKeyword(s: String): String = if (ScalaKeywords.values(s)) s"`${s}`" else s
def ignoreResult[A](f: => A): Unit =
f; ()
def ignoreResult[A](f: => A): Unit = {
val _ = f
()
}
lazy val isMac: Boolean =
System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("mac")