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