diff options
author | Mario Krehl <mkrehl@science-computing.de> | 2016-09-07 12:57:34 +0200 |
---|---|---|
committer | Mario Krehl <mkrehl@science-computing.de> | 2016-09-07 12:57:34 +0200 |
commit | 6fe440880070e53bc7c1a68d2941cbc108909691 (patch) | |
tree | f034e389a0d2a1df09cec3d77ca7fff1e83fa6ca /bin | |
parent | e2d3e5597bbfb64b337de207eb0af67922ab62f4 (diff) |
Reduce clone()-ing of commands to necessary places
Diffstat (limited to 'bin')
-rw-r--r-- | bin/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/src/main.rs b/bin/src/main.rs index afe37cbb..71d56820 100644 --- a/bin/src/main.rs +++ b/bin/src/main.rs @@ -153,7 +153,7 @@ fn main() { if matches.is_present("versions") { debug!("Showing versions"); let mut result = vec![]; - for command in get_commands().iter() { + for command in commands.iter() { result.push(crossbeam::scope(|scope| { scope.spawn(|| { let v = Command::new(format!("imag-{}",command)).arg("--version").output(); @@ -186,7 +186,7 @@ fn main() { }; // Typos happen, so check if the given subcommand is one found in $PATH - if !commands.clone().contains(&String::from(subcommand)) { + if !commands.contains(&String::from(subcommand)) { println!("No such command: 'imag-{}'", subcommand); println!("See 'imag --help' for available subcommands"); exit(2); |