aboutsummaryrefslogtreecommitdiff
path: root/crates/project_model/src/sysroot.rs
diff options
context:
space:
mode:
authorMaan2003 <[email protected]>2021-06-13 04:54:16 +0100
committerMaan2003 <[email protected]>2021-06-13 04:54:16 +0100
commitc9b4ac5be4daaabc062ab1ee663eba8594750003 (patch)
tree6090c8c38c735875c916255920525cf5fff45c75 /crates/project_model/src/sysroot.rs
parentd6737e55fb49d286b5e646f57975b27b2c95ce92 (diff)
clippy::redudant_borrow
Diffstat (limited to 'crates/project_model/src/sysroot.rs')
-rw-r--r--crates/project_model/src/sysroot.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/project_model/src/sysroot.rs b/crates/project_model/src/sysroot.rs
index 4e39d6dd3..a22f79c15 100644
--- a/crates/project_model/src/sysroot.rs
+++ b/crates/project_model/src/sysroot.rs
@@ -142,12 +142,12 @@ fn discover_sysroot_src_dir(
142 log::debug!("RUST_SRC_PATH is set, but is invalid (no core: {:?}), ignoring", core); 142 log::debug!("RUST_SRC_PATH is set, but is invalid (no core: {:?}), ignoring", core);
143 } 143 }
144 144
145 get_rust_src(&sysroot_path) 145 get_rust_src(sysroot_path)
146 .or_else(|| { 146 .or_else(|| {
147 let mut rustup = Command::new(toolchain::rustup()); 147 let mut rustup = Command::new(toolchain::rustup());
148 rustup.current_dir(current_dir).args(&["component", "add", "rust-src"]); 148 rustup.current_dir(current_dir).args(&["component", "add", "rust-src"]);
149 utf8_stdout(rustup).ok()?; 149 utf8_stdout(rustup).ok()?;
150 get_rust_src(&sysroot_path) 150 get_rust_src(sysroot_path)
151 }) 151 })
152 .ok_or_else(|| { 152 .ok_or_else(|| {
153 format_err!( 153 format_err!(