You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Experience has shown that this package gets used to write a lot of code like the following:
Invariants.checkInvariantL(
target.capacity(),
size == target.capacity(),
x -> "Allocated target buffer must be the correct size");
Note that size cannot appear in the contract message without turning the message lambda into a capturing lambda, which entails an allocation. Some entry points should be added that allow passing in an expected value so that it can appear in any error messages without any extra cost.
The text was updated successfully, but these errors were encountered:
Experience has shown that this package gets used to write a lot of code like the following:
Note that
size
cannot appear in the contract message without turning the message lambda into a capturing lambda, which entails an allocation. Some entry points should be added that allow passing in an expected value so that it can appear in any error messages without any extra cost.The text was updated successfully, but these errors were encountered: