Skip to content

Instantly share code, notes, and snippets.

@nikomatsakis
Created August 7, 2012 04:00
Show Gist options
  • Save nikomatsakis/3281394 to your computer and use it in GitHub Desktop.
Save nikomatsakis/3281394 to your computer and use it in GitHub Desktop.
fn main() {
let mut v = some(22);
match v {
none => {}
some(ref mut p) => { *p += 1; }
}
assert v == some(23);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment