chore: Fix clippy lints

Use is_some_and instead of map_or(false
This commit is contained in:
Thayne McCombs
2025-01-28 01:55:21 -07:00
parent 2a66fbab28
commit 8c177567a7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ fn print_trailing_slash<W: Write>(
config: &Config,
style: Option<&Style>,
) -> io::Result<()> {
if entry.file_type().map_or(false, |ft| ft.is_dir()) {
if entry.file_type().is_some_and(|ft| ft.is_dir()) {
write!(
stdout,
"{}",
+1 -1
View File
@@ -477,7 +477,7 @@ impl WorkerState {
&& path
.symlink_metadata()
.ok()
.map_or(false, |m| m.file_type().is_symlink()) =>
.is_some_and(|m| m.file_type().is_symlink()) =>
{
DirEntry::broken_symlink(path)
}