mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 09:16:59 +00:00
Using an untyped, one-letter variable binding as an argument to a function and then not using it until over 100 lines later is just mean.
This commit is contained in:
parent
584b40578d
commit
992a59efc3
|
@ -89,7 +89,7 @@ pub fn parse(args: &[String]) -> Flags {
|
|||
opts.optopt("j", "jobs", "number of jobs to run in parallel", "JOBS");
|
||||
opts.optflag("h", "help", "print this help message");
|
||||
|
||||
let usage = |n, opts: &Options| -> ! {
|
||||
let usage = |exit_code, opts: &Options| -> ! {
|
||||
let subcommand_help = format!("\
|
||||
Usage: x.py <subcommand> [options] [<paths>...]
|
||||
|
||||
|
@ -191,7 +191,7 @@ pub fn parse(args: &[String]) -> Flags {
|
|||
}
|
||||
}
|
||||
|
||||
process::exit(n);
|
||||
process::exit(exit_code);
|
||||
};
|
||||
if args.len() == 0 {
|
||||
println!("a subcommand must be passed");
|
||||
|
|
Loading…
Reference in a new issue