Created
April 6, 2018 12:24
-
-
Save rust-play/30996e6970bb7b3eb0f1f839e33a85e0 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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