diff options
| author | Nathan Stocks <nathan.stocks@gmail.com> | 2017-03-30 20:58:07 -0600 |
|---|---|---|
| committer | Nathan Stocks <nathan.stocks@gmail.com> | 2017-03-30 20:58:07 -0600 |
| commit | 8ad5c95e521f90897a6bd611956d476fcc51c042 (patch) | |
| tree | 814a5632400118ab78b55d2e27691fd5a52f0128 /src/bootstrap | |
| parent | e1b0027b51d8c8b7558513565c2baa45f1b1b984 (diff) | |
When dealing with the list of all possible subcommands, deal with them in the same order to ease comparing the sections of code in order. I chose the order that appears in the help text, because that is most likely to have been ordered with specific reasoning.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/flags.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index ea0fc97e22a..556a362a874 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -157,11 +157,11 @@ Arguments: if let Some(subcommand) = subcommand { if subcommand == "build" || - subcommand == "dist" || - subcommand == "doc" || subcommand == "test" || subcommand == "bench" || - subcommand == "clean" { + subcommand == "doc" || + subcommand == "clean" || + subcommand == "dist" { println!("Available invocations:"); if args.iter().any(|a| a == "-v") { let flags = Flags::parse(&["build".to_string()]); @@ -219,10 +219,6 @@ To learn more about a subcommand, run `./x.py <subcommand> -h` m = parse(&opts); Subcommand::Build { paths: remaining_as_path(&m) } } - "doc" => { - m = parse(&opts); - Subcommand::Doc { paths: remaining_as_path(&m) } - } "test" => { opts.optmulti("", "test-args", "extra arguments", "ARGS"); m = parse(&opts); @@ -239,6 +235,10 @@ To learn more about a subcommand, run `./x.py <subcommand> -h` test_args: m.opt_strs("test-args"), } } + "doc" => { + m = parse(&opts); + Subcommand::Doc { paths: remaining_as_path(&m) } + } "clean" => { m = parse(&opts); if m.free.len() > 0 { |
