Merge pull request #4032 from catamorphism/getopts
[libstd] getopts, now with fewer copies
This commit is contained in:
commit
082a88e42c
10 changed files with 68 additions and 53 deletions
|
|
@ -53,7 +53,7 @@ fn parse_opts(argv: ~[~str]) -> config {
|
|||
let opt_args = vec::slice(argv, 1u, vec::len(argv));
|
||||
|
||||
match getopts::getopts(opt_args, opts) {
|
||||
Ok(m) => { return {stress: getopts::opt_present(m, ~"stress")} }
|
||||
Ok(ref m) => { return {stress: getopts::opt_present(m, ~"stress")} }
|
||||
Err(_) => { fail; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue