From 1e5389853ca3a99a338f3a40cbb96150f711410c Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Sun, 2 Apr 2017 13:11:53 -0600 Subject: [PATCH] Fix breaking the 'clean' subcommand caused replacing a single-letter variable with the same value in two contexts where it was used differently. That's why you don't use "m" as a variable for hundreds of lines in an outer function, and re-use it in closures several times in the same function. Sheesh. --- src/bootstrap/flags.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index c374d27fe4f3..2e133664a05b 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -244,7 +244,7 @@ Arguments: Subcommand::Doc { paths: paths } } "clean" => { - if matches.free.len() > 0 { + if paths.len() > 0 { println!("\nclean takes no arguments\n"); usage(1, &opts, &subcommand_help, &extra_help); }