savi-lang / savi

A fast language for programmers who are passionate about their craft.
BSD 3-Clause "New" or "Revised" License
153 stars 12 forks source link

Add error-raising variants of `Bytes.truncate*` and `.chop*` methods. #473

Closed jemc closed 2 months ago

jemc commented 2 months ago

These variants can be used when the caller prefers to avoid silently reducing the truncate/chop offset in the case where the filled size of the buffer is too small.

These variants raise an error instead.