vec_to_array
Moves a heap allocated Vec
into a stack allocated array.
let vec: = vec!;
let array: = vec_to_array!;
assert_eq!;
let vec: = vec!;
let array: = try_vec_to_array!;
assert_eq!;
Motivation
For Vec
, Into
is not implement for arrays greater than a size of 12.
let v: = vec!;
let arr: = v.into; /// will not compile
let v: = vec!;
let arr: = v.try_into; /// Will be an Err
Solution this crate adds vec_to_array
and try_vec_to_array