mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
remove needless borrows
This commit is contained in:
parent
77051679d7
commit
ed128872eb
53 changed files with 87 additions and 87 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue