Skip to content

Commit

Permalink
Merge pull request #531 from gemmaro/master
Browse files Browse the repository at this point in the history
Minor change: Use "args" where there is more than one "arg"
  • Loading branch information
sagiegurari authored Mar 10, 2021
2 parents 9c6a676 + 9588640 commit ccce394
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
4 changes: 1 addition & 3 deletions src/lib/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ pub(crate) fn run_command_get_output(

match *args {
Some(ref args_vec) => {
for arg in args_vec.iter() {
command.arg(arg);
}
command.args(args_vec);
}
None => debug!("No command args defined."),
};
Expand Down
6 changes: 1 addition & 5 deletions src/lib/installer/cargo_plugin_installer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ fn is_crate_installed(toolchain: &Option<String>, crate_name: &str) -> bool {
Some(ref toolchain_string) => {
let command_spec = wrap_command(toolchain_string, "cargo", &None);
let mut cmd = Command::new(command_spec.command);

let args_vec = command_spec.args.unwrap();
for arg in args_vec.iter() {
cmd.arg(arg);
}
cmd.args(command_spec.args.unwrap());

cmd
}
Expand Down
6 changes: 1 addition & 5 deletions src/lib/installer/rustup_component_installer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ pub(crate) fn is_installed(toolchain: &Option<String>, binary: &str, test_args:
Some(ref toolchain_string) => {
let command_spec = wrap_command(toolchain_string, binary, &None);
let mut cmd = Command::new(command_spec.command);

let args_vec = command_spec.args.unwrap();
for arg in args_vec.iter() {
cmd.arg(arg);
}
cmd.args(command_spec.args.unwrap());

cmd
}
Expand Down

0 comments on commit ccce394

Please sign in to comment.