From 511cc6c5c5fb086840922210f0e7ad5b9b944746 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 6 Sep 2016 23:36:41 -0700 Subject: [PATCH] Evaluate arg to Boolean.option lazily --- src/main/scala/rocket/util.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/rocket/util.scala b/src/main/scala/rocket/util.scala index 54eaf6e3..7f810d2a 100644 --- a/src/main/scala/rocket/util.scala +++ b/src/main/scala/rocket/util.scala @@ -30,7 +30,7 @@ object Util { def toInt: Int = if (x) 1 else 0 // this one's snagged from scalaz - def option[T](z: T): Option[T] = if (x) Some(z) else None + def option[T](z: => T): Option[T] = if (x) Some(z) else None } }