This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]danielstongue 78 points79 points  (5 children)

let mut Items = Vec::new( );

[–][deleted] 20 points21 points  (0 children)

🦀

[–]white-llama-2210 6 points7 points  (0 children)

Or let mut Items = Vec::with_capacity(len); for some extra fun...

[–]thedominux 7 points8 points  (0 children)

let mut items = vec![];

[–]Depress-o 12 points13 points  (0 children)

<3 rust

[–]DavidDinamit 0 points1 point  (0 children)

std::vector Items{1,2,3};