mirror of
https://github.com/sbt/sbt.git
synced 2026-09-03 08:34:34 +02:00
Merge pull request #6711 from xuwei-k/fix-scala-2-13-warn
fix Scala 2.13 warnings
This commit is contained in:
@@ -31,7 +31,7 @@ object SingletonCache {
|
||||
|
||||
implicit def basicSingletonCache[A: JsonFormat]: SingletonCache[A] =
|
||||
new SingletonCache[A] {
|
||||
override def read(from: Input): A = from.read[A]
|
||||
override def read(from: Input): A = from.read[A]()
|
||||
override def write(to: Output, value: A) = to.write(value)
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class CacheSpec extends AnyFlatSpec {
|
||||
testCache[String, Int] {
|
||||
case (cache, store) =>
|
||||
cache(store)("missing") match {
|
||||
case Hit(_) => fail
|
||||
case Hit(_) => fail()
|
||||
case Miss(_) => ()
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@ class CacheSpec extends AnyFlatSpec {
|
||||
testCache[String, Int] {
|
||||
case (cache, store) =>
|
||||
cache(store)("missing") match {
|
||||
case Hit(_) => fail
|
||||
case Hit(_) => fail()
|
||||
case Miss(update) => update(5)
|
||||
}
|
||||
}
|
||||
@@ -41,13 +41,13 @@ class CacheSpec extends AnyFlatSpec {
|
||||
case (cache, store) =>
|
||||
val value = 5
|
||||
cache(store)("someKey") match {
|
||||
case Hit(_) => fail
|
||||
case Hit(_) => fail()
|
||||
case Miss(update) => update(value)
|
||||
}
|
||||
|
||||
cache(store)("someKey") match {
|
||||
case Hit(read) => assert(read === value); ()
|
||||
case Miss(_) => fail
|
||||
case Miss(_) => fail()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,13 +58,13 @@ class CacheSpec extends AnyFlatSpec {
|
||||
val key = "someKey"
|
||||
val value = 5
|
||||
cache(store)(key) match {
|
||||
case Hit(_) => fail
|
||||
case Hit(_) => fail()
|
||||
case Miss(update) => update(value)
|
||||
}
|
||||
|
||||
cache(store)(key) match {
|
||||
case Hit(read) => assert(read === value); ()
|
||||
case Miss(_) => fail
|
||||
case Miss(_) => fail()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user