SizeConstraint::Full now defer to requested size if larger than available

This commit is contained in:
Alexandre Bury 2019-07-31 21:44:14 -07:00
parent 349756e514
commit c0004c54c0

View File

@ -43,7 +43,7 @@ impl SizeConstraint {
SizeConstraint::AtLeast(value) if result < value => value,
SizeConstraint::AtMost(value) if result > value => value,
SizeConstraint::Fixed(value) => value,
SizeConstraint::Full => available,
SizeConstraint::Full if available > result => available,
_ => result,
}
}