Compare commits

...
Author SHA1 Message Date
arookieofc e38201de19 style(ide-extension): fix clippy::needless_bool on the new Rust toolchain 2026-11-13 06:21:30 +08:00
arookieofc b938e28d81 style(ide-core): drop the tail return the needless-bool fix added 2026-11-13 04:57:58 +08:00
arookieofc e4c99c3ecf style(ide-core): return the executable bit through a cfg-gated return
The #[cfg(unix)] / #[cfg(not(unix))] tail produced a bool literal for the
non-unix arm, tripping clippy::needless_bool on the new Rust 1.100 toolchain.
Give the unix arm an early return and keep the non-unix arm a block.
2026-11-13 02:38:38 +08:00
2 changed files with 8 additions and 2 deletions

No files matched your search

+4 -1
View File
@@ -70,7 +70,10 @@ fn is_executable(path: &Path) -> bool {
metadata.permissions().mode() & 0o111 != 0
}
#[cfg(not(unix))]
true
{
let _ = &metadata;
true
}
}
/// [`search_path`]'s directories, in order and once each. Only absolute ones: a
+4 -1
View File
@@ -467,7 +467,10 @@ fn is_executable(p: &Path) -> bool {
meta.permissions().mode() & 0o111 != 0
}
#[cfg(not(unix))]
true
{
let _ = &meta;
true
}
}
/// blake3 of a file, hex.