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
|
@ -171,7 +171,7 @@ fn discover_sysroot_dir(
|
|||
) -> Result<AbsPathBuf> {
|
||||
let mut rustc = Command::new(toolchain::rustc());
|
||||
rustc.envs(extra_env);
|
||||
rustc.current_dir(current_dir).args(&["--print", "sysroot"]);
|
||||
rustc.current_dir(current_dir).args(["--print", "sysroot"]);
|
||||
tracing::debug!("Discovering sysroot by {:?}", rustc);
|
||||
let stdout = utf8_stdout(rustc)?;
|
||||
Ok(AbsPathBuf::assert(PathBuf::from(stdout)))
|
||||
|
@ -203,7 +203,7 @@ fn discover_sysroot_src_dir_or_add_component(
|
|||
.or_else(|| {
|
||||
let mut rustup = Command::new(toolchain::rustup());
|
||||
rustup.envs(extra_env);
|
||||
rustup.current_dir(current_dir).args(&["component", "add", "rust-src"]);
|
||||
rustup.current_dir(current_dir).args(["component", "add", "rust-src"]);
|
||||
tracing::info!("adding rust-src component by {:?}", rustup);
|
||||
utf8_stdout(rustup).ok()?;
|
||||
get_rust_src(sysroot_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue