Skip to content

Instantly share code, notes, and snippets.

@kenzan100
Last active December 5, 2016 17:45
Show Gist options
  • Save kenzan100/893a6e823569dc76ab554f80d09efb67 to your computer and use it in GitHub Desktop.
Save kenzan100/893a6e823569dc76ab554f80d09efb67 to your computer and use it in GitHub Desktop.
fn make_v() {
let mut v = vec![2, 4]; // owned by make_v's scope
v.push(8);
// scope ends, `v` is destroyed
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment