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
Auto merge of #117 - llogiq:from_buf_and_len, r=mbrubeck
new constructors: from_buf_and_len(_unchecked)
Those functions allow to create an inline SmallVec supplying both buf and len arguments, so only a part of the buffer is used. The unchecked variant doesn't check if the length is less or equal than the buffer length.
This allows users to set up a partially used in-band buffer in one step (instead of using `from_buf` and calling `truncate` or `set_len` later).
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/117)
<!-- Reviewable:end -->
0 commit comments