mirror of https://github.com/sbt/sbt.git
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:
parent
f2c8d4f436
commit
055d7cd626
|
|
@ -56,8 +56,8 @@ private[sbt] object InMemoryCacheStore {
|
||||||
override def read[T]()(implicit reader: JsonReader[T]): T = {
|
override def read[T]()(implicit reader: JsonReader[T]): T = {
|
||||||
val lastModified = IO.getModifiedTimeOrZero(path.toFile)
|
val lastModified = IO.getModifiedTimeOrZero(path.toFile)
|
||||||
store.get[T](path) match {
|
store.get[T](path) match {
|
||||||
case Some((value: T, `lastModified`)) => value
|
case Some((value, `lastModified`)) => value
|
||||||
case _ => cacheStore.read[T]()
|
case _ => cacheStore.read[T]()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
override def write[T](value: T)(implicit writer: JsonWriter[T]): Unit = {
|
override def write[T](value: T)(implicit writer: JsonWriter[T]): Unit = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue