mirror of https://github.com/sbt/sbt.git
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:
parent
8d20bd4c94
commit
f2c8d4f436
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue