mirror of
https://github.com/sbt/sbt.git
synced 2026-08-29 01:24:09 +02:00
Remove unneeded cast
This was causing an abstract type pattern T is unchecked since it is eliminated by erasure. It was unneeded because store.get[T] return Option[(T, Long)]. I'm surprised that the compiler complained about this.
This commit is contained in:
@@ -56,8 +56,8 @@ private[sbt] object InMemoryCacheStore {
|
||||
override def read[T]()(implicit reader: JsonReader[T]): T = {
|
||||
val lastModified = IO.getModifiedTimeOrZero(path.toFile)
|
||||
store.get[T](path) match {
|
||||
case Some((value: T, `lastModified`)) => value
|
||||
case _ => cacheStore.read[T]()
|
||||
case Some((value, `lastModified`)) => value
|
||||
case _ => cacheStore.read[T]()
|
||||
}
|
||||
}
|
||||
override def write[T](value: T)(implicit writer: JsonWriter[T]): Unit = {
|
||||
|
||||
Reference in New Issue
Block a user