remove needless borrows

This commit is contained in:
Daniel Eades 2022-12-30 08:05:03 +00:00
parent 77051679d7
commit ed128872eb
53 changed files with 87 additions and 87 deletions

View file

@ -50,10 +50,10 @@ fn get_rust_cfgs(
cargo_config.envs(extra_env);
cargo_config
.current_dir(cargo_toml.parent())
.args(&["rustc", "-Z", "unstable-options", "--print", "cfg"])
.args(["rustc", "-Z", "unstable-options", "--print", "cfg"])
.env("RUSTC_BOOTSTRAP", "1");
if let Some(target) = target {
cargo_config.args(&["--target", target]);
cargo_config.args(["--target", target]);
}
match utf8_stdout(cargo_config) {
Ok(it) => return Ok(it),
@ -63,9 +63,9 @@ fn get_rust_cfgs(
// using unstable cargo features failed, fall back to using plain rustc
let mut cmd = Command::new(toolchain::rustc());
cmd.envs(extra_env);
cmd.args(&["--print", "cfg", "-O"]);
cmd.args(["--print", "cfg", "-O"]);
if let Some(target) = target {
cmd.args(&["--target", target]);
cmd.args(["--target", target]);
}
utf8_stdout(cmd)
}