TLFragmenter: Continuing my spot battles on requires without explanatory strings (#882)
This commit is contained in:
parent
cf75c2049d
commit
f2002839eb
@ -28,7 +28,8 @@ class TLFragmenter(val minSize: Int, val maxSize: Int, val alwaysMin: Boolean =
|
|||||||
val addedBits = fragmentBits + toggleBits
|
val addedBits = fragmentBits + toggleBits
|
||||||
|
|
||||||
def expandTransfer(x: TransferSizes) = if (!x) x else {
|
def expandTransfer(x: TransferSizes) = if (!x) x else {
|
||||||
require (x.max >= minSize) // validate that we can apply the fragmenter correctly
|
// validate that we can apply the fragmenter correctly
|
||||||
|
require (x.max >= minSize, s"max transfer size (${x.max}) must be >= min transfer size (${minSize})")
|
||||||
TransferSizes(x.min, maxSize)
|
TransferSizes(x.min, maxSize)
|
||||||
}
|
}
|
||||||
def shrinkTransfer(x: TransferSizes) =
|
def shrinkTransfer(x: TransferSizes) =
|
||||||
|
Loading…
Reference in New Issue
Block a user