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:
Nathan Stocks 2017-03-30 22:20:51 -06:00
parent 584b40578d
commit 992a59efc3

View File

@ -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");