Skip to content

Instantly share code, notes, and snippets.

@adamhjk
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save adamhjk/e296257b32818ee8691d to your computer and use it in GitHub Desktop.
Save adamhjk/e296257b32818ee8691d to your computer and use it in GitHub Desktop.
fn main() {
let args: Vec<String> = os::args();
let mut washed_args = Vec::new();
for arg in args.iter() {
washed_args.push(arg.as_slice())
}
match washed_args.as_slice() {
[_, “review”, opts..] => { review(opts) }
_ => { usage() }
}
}
@panzi
Copy link

panzi commented Nov 8, 2014

You can skip the :Vec<String>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment