From c460939d036bbd31019ad46f66edb468f2678e4c Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Fri, 27 Sep 2019 10:51:42 -0400 Subject: [PATCH] Clean up Arbitrary This is part of work on Gen performance improvements. --- src/main/scala/org/scalacheck/Arbitrary.scala | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/scala/org/scalacheck/Arbitrary.scala b/src/main/scala/org/scalacheck/Arbitrary.scala index e0d319eb2..69b45bb91 100644 --- a/src/main/scala/org/scalacheck/Arbitrary.scala +++ b/src/main/scala/org/scalacheck/Arbitrary.scala @@ -134,17 +134,16 @@ private[scalacheck] sealed trait ArbitraryLowPriority { } /** Arbitrary instance of Byte */ - implicit lazy val arbByte: Arbitrary[Byte] = Arbitrary( - Gen.chooseNum(Byte.MinValue, Byte.MaxValue) - ) + implicit lazy val arbByte: Arbitrary[Byte] = + Arbitrary(Gen.chooseNum(Byte.MinValue, Byte.MaxValue)) /** Arbitrary instance of Short */ - implicit lazy val arbShort: Arbitrary[Short] = Arbitrary( - Gen.chooseNum(Short.MinValue, Short.MaxValue) - ) + implicit lazy val arbShort: Arbitrary[Short] = + Arbitrary(Gen.chooseNum(Short.MinValue, Short.MaxValue)) /** Absolutely, totally, 100% arbitrarily chosen Unit. */ - implicit lazy val arbUnit: Arbitrary[Unit] = Arbitrary(const(())) + implicit lazy val arbUnit: Arbitrary[Unit] = + Arbitrary(Gen.const(())) /**** Arbitrary instances of other common types ****/