aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_toolchain/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_toolchain/src')
-rw-r--r--crates/ra_toolchain/src/lib.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_toolchain/src/lib.rs b/crates/ra_toolchain/src/lib.rs
index 3c307a0ea..3d2865e09 100644
--- a/crates/ra_toolchain/src/lib.rs
+++ b/crates/ra_toolchain/src/lib.rs
@@ -53,10 +53,9 @@ fn lookup_in_path(exec: &str) -> bool {
53 let paths = env::var_os("PATH").unwrap_or_default(); 53 let paths = env::var_os("PATH").unwrap_or_default();
54 let mut candidates = env::split_paths(&paths).flat_map(|path| { 54 let mut candidates = env::split_paths(&paths).flat_map(|path| {
55 let candidate = path.join(&exec); 55 let candidate = path.join(&exec);
56 let with_exe = if env::consts::EXE_EXTENSION == "" { 56 let with_exe = match env::consts::EXE_EXTENSION {
57 None 57 "" => None,
58 } else { 58 it => Some(candidate.with_extension(it)),
59 Some(candidate.with_extension(env::consts::EXE_EXTENSION))
60 }; 59 };
61 iter::once(candidate).chain(with_exe) 60 iter::once(candidate).chain(with_exe)
62 }); 61 });