Skip to content

Instantly share code, notes, and snippets.

@ryanmr

ryanmr/match2.rs

Created Dec 26, 2014
Embed
What would you like to do?
let args = os::args();
let tasks:uint = match args.len() {
2 => match args[1].as_slice().trim().parse() {
Some(x) => x,
None => 1
},
_ => 1
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment