Uh oh!
There was an error while loading. Please reload this page.
Add vec macros - #438
Conversation
| /// array. | ||
| /// | ||
| /// The length of the provided array must be `N`. | ||
| pub fn from_array_same_cap(src: [T; N]) -> Self { |
There was a problem hiding this comment.
N can be constructed in the macro, so this isn't needed.
reitermarkus
commented
Jan 16, 2024
I think instead of vec![1,2,3]// Vec::<_, 3>::from([1, 2, 3])vec![1;3]// Vec::<_, 3>::from([1; 3])vec![1,2,3;6]// Vec::<_, 6>::from([1, 2, 3])vec![1;3;6]// Vec::<_, 6>::from([1; 3])would work. |
birkenfeld
commented
Jan 16, 2024
That's ambiguous though in the case of |
reitermarkus
commented
Jan 21, 2024
Good point. In that case, maybe Then again, I think let vec:Vec<_,6> = vec![1;3];should work when using |
If we don't go with the |
Add
vecandvec_with_capmacrosResolves#344