Skip to content

Instantly share code, notes, and snippets.

@bstrie
Created January 21, 2014 19:46
Show Gist options
  • Save bstrie/8547000 to your computer and use it in GitHub Desktop.
Save bstrie/8547000 to your computer and use it in GitHub Desktop.
fn main() {
let argv = std::os::args();
let (x, y, z) = match argv {
[filename, arg1, arg2, arg3, ..rest] => (arg1, arg2, arg3),
_ => fail!("At least three arguments expected.")
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment