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:
Ethan Atkins 2019-07-13 15:23:06 -07:00
parent f2c8d4f436
commit 055d7cd626
1 changed files with 2 additions and 2 deletions

View File

@ -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 = {