1
0

TLFragmenter: Continuing my spot battles on requires without explanatory strings (#882)

This commit is contained in:
Megan Wachs 2017-07-21 21:55:32 -07:00 committed by Wesley W. Terpstra
parent cf75c2049d
commit f2002839eb

View File

@ -28,7 +28,8 @@ class TLFragmenter(val minSize: Int, val maxSize: Int, val alwaysMin: Boolean =
val addedBits = fragmentBits + toggleBits
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)
}
def shrinkTransfer(x: TransferSizes) =