Fix implicit numeric widening warning

I noticed in CI that a warning was printed for this file about implicit
numeric widening in the GigaBytes case.
This commit is contained in:
Ethan Atkins 2019-07-13 15:19:17 -07:00
parent 8d20bd4c94
commit f2c8d4f436
1 changed files with 4 additions and 4 deletions

View File

@ -47,10 +47,10 @@ private[sbt] object SizeParser {
.map {
case (number, unit) =>
unit match {
case None | Some(Bytes) => multiply(number, right = 1)
case Some(KiloBytes) => multiply(number, right = 1024)
case Some(MegaBytes) => multiply(number, right = 1024 * 1024)
case Some(GigaBytes) => multiply(number, right = 1024 * 1024 * 1024)
case None | Some(Bytes) => multiply(number, right = 1L)
case Some(KiloBytes) => multiply(number, right = 1024L)
case Some(MegaBytes) => multiply(number, right = 1024L * 1024)
case Some(GigaBytes) => multiply(number, right = 1024L * 1024 * 1024)
}
}
}