Skip to content

Instantly share code, notes, and snippets.

@bstrie
Created January 22, 2014 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bstrie/8567988 to your computer and use it in GitHub Desktop.
Save bstrie/8567988 to your computer and use it in GitHub Desktop.
struct Foo {
a: (int, int)
}
fn main() {
let foo = Foo { a: (1, 2) };
let Foo { a: (x, y) } = foo;
println!("{} {}", x, y);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment