Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main {
- /* Type inference works here,
- so we don't explicitly declare
- the type of vec. */
- let mut vec = Vec::new(); // vec<i32>
- // Append data into the tail of the vector
- vec.push(1);
- vec.push(2);
- vec.push(3);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement