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
If you're looking to make vector initialization from arrays a one-liner and avoid extra copies, one soluton could be if we implement From<[T; M]> for Vec<T, N> where N >= M.
let v:Vec<u8,8> = [0,1,2,3].into();// capacity=8, length=4
Activity
rjsberry commentedon Feb 27, 2023
If you're looking to make vector initialization from arrays a one-liner and avoid extra copies, one soluton could be if we implement
From<[T; M]> for Vec<T, N>
whereN >= M
.Vec
improvements #427