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

@ -66,7 +66,7 @@ impl WorkspaceBuildScripts {
_ => {
let mut cmd = Command::new(toolchain::cargo());
cmd.args(&["check", "--quiet", "--workspace", "--message-format=json"]);
cmd.args(["check", "--quiet", "--workspace", "--message-format=json"]);
// --all-targets includes tests, benches and examples in addition to the
// default lib and bins. This is an independent concept from the --target
@ -74,7 +74,7 @@ impl WorkspaceBuildScripts {
cmd.arg("--all-targets");
if let Some(target) = &config.target {
cmd.args(&["--target", target]);
cmd.args(["--target", target]);
}
match &config.features {
@ -122,7 +122,7 @@ impl WorkspaceBuildScripts {
InvocationLocation::Root(root) if config.run_build_script_command.is_some() => {
root.as_path()
}
_ => &workspace.workspace_root(),
_ => workspace.workspace_root(),
}
.as_ref();
@ -133,7 +133,7 @@ impl WorkspaceBuildScripts {
// building build scripts failed, attempt to build with --keep-going so
// that we potentially get more build data
let mut cmd = Self::build_command(config)?;
cmd.args(&["-Z", "unstable-options", "--keep-going"]).env("RUSTC_BOOTSTRAP", "1");
cmd.args(["-Z", "unstable-options", "--keep-going"]).env("RUSTC_BOOTSTRAP", "1");
let mut res = Self::run_per_ws(cmd, workspace, current_dir, progress)?;
res.error = Some(error);
Ok(res)