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
Method that return a mutable ref on the full capacity inner array, then it is possible to call av.as_mut_slice_full()[2..4].copy_from_slice(inp)
It wouldn't work as there is no way to update the len of the arrayvec
Also From<[T; LEN]>#232 is useful to init the arrayvec with the initial data but would not be able to let us do it at an offset
Add
copy_from_slice_at
similar to copy_from_slice method inArrayVec
would make easier to copy an existing slice array into an ArrayVec.It is similar to try_extend_from_slice but doesn't return a Result and panic if not enough capacity is left
We can also make sure that everything before the offset is initialized by checking it is smaller than the current len.
Alternatives
Also
From<[T; LEN]>
#232 is useful to init the arrayvec with the initial data but would not be able to let us do it at an offsetStack overflow question that lead me here: https://stackoverflow.com/questions/79434542/return-a-subslice-of-a-const-size-slice
The text was updated successfully, but these errors were encountered: