Порівняти коміти

...
1 Коміти
Автор SHA1 Повідомлення Дата
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
+5 -2
Переглянути файл
@@ -67,10 +67,13 @@ fn is_executable(path: &Path) -> bool {
#[cfg(unix)]
{
use std::os::unix::fs::PermissionsExt;
metadata.permissions().mode() & 0o111 != 0
return 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