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
The Vec::splice method is complicated because it has to work with types that are not Copy. However, u8 is Copy, so it should not be too hard to emulate it with copy_within followed by truncate.
The hard part really is when the destination range is smaller than the source range since it requires at least one reallocation (if the size hint lower bound proves to be enough).
In my question to move from
Arc<Vec<u8>>
toBytesMut
, I am facing a couple of missing methods I had onVec
.One of them is
splice
(https://doc.rust-lang.org/std/vec/struct.Vec.html#method.splice).I am guessing this method could go in
BufMut
?The text was updated successfully, but these errors were encountered: