Skip to content

Instantly share code, notes, and snippets.

@maretekent
Forked from rust-play/playground.rs
Created April 6, 2018 12:25
Show Gist options
  • Save maretekent/ee37b366fc98db2972708a4a3a56ef6a to your computer and use it in GitHub Desktop.
Save maretekent/ee37b366fc98db2972708a4a3a56ef6a to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
fn main() {
give();
}
fn give(){
let mut vec = Vec::new();
vec.push(1);
vec.push(2);
take(vec);
vec.push(3);
}
fn take(vec: Vec<i32>){
println!("{:?}", vec);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment