6 lines
153 B
Text
6 lines
153 B
Text
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];
|