We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a42729a commit 2f7c30cCopy full SHA for 2f7c30c
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();
54
let mut candidates = env::split_paths(&paths).flat_map(|path| {
55
let candidate = path.join(&exec);
56
- let with_exe = if env::consts::EXE_EXTENSION == "" {
57
- None
58
- } else {
59
- Some(candidate.with_extension(env::consts::EXE_EXTENSION))
+ let with_exe = match env::consts::EXE_EXTENSION {
+ "" => None,
+ it => Some(candidate.with_extension(it)),
60
};
61
iter::once(candidate).chain(with_exe)
62
});
0 commit comments