Skip to content

Instantly share code, notes, and snippets.

@mjburgess
Created March 19, 2013 23:36
Show Gist options
  • Save mjburgess/5201141 to your computer and use it in GitHub Desktop.
Save mjburgess/5201141 to your computer and use it in GitHub Desktop.
struct X { mut x: ~[int] }
fn main() {
let x = X { x: ~[1] };
x.x.append_one(2);
io::println(fmt!("%d", x.x[1]));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment