Skip to content
Myr

chore: Fix clippy lints

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Use is_some_and instead of map_or(false

authored by Thayne McCombs · committed by Thayne McCombs · parent 2a66fba · Browse files · 2 files+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−2 removed

  • other:+2 added−2 removed

2 files+2 added−2 removed

modified:src/output.rs+1 added-1 removed
49 unmodified lines
50 entry: &DirEntry,51 config: &Config,52 style: Option<&Style>,53) -> io::Result<()> {54 if entry.file_type().map_or(false, |ft| ft.is_dir()) {54 if entry.file_type().is_some_and(|ft| ft.is_dir()) {55 write!(56 stdout,57 "{}",58 style
117 unmodified lines
modified:src/walk.rs+1 added-1 removed
475 unmodified lines
476 if io_error.kind() == io::ErrorKind::NotFound477 && path478 .symlink_metadata()479 .ok()480 .map_or(false, |m| m.file_type().is_symlink()) =>480 .is_some_and(|m| m.file_type().is_symlink()) =>481 {482 DirEntry::broken_symlink(path)483 }484 _ => {
186 unmodified lines