RosettaCodeData/Task/Collections/Rust/collections-3.rust

7 lines
153 B
Text
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
let mut v = Vec::new();
v.push(1);
v.push(2);
v.push(3);
// Or (mostly) equivalently via a convenient macro in the standard library
let v = vec![1,2,3];