Skip to content

Commit

Permalink
chore: Fix clippy lints
Browse files Browse the repository at this point in the history
Use is_some_and instead of map_or(false
  • Loading branch information
tmccombs committed Jan 28, 2025
1 parent 2a66fba commit 8c17756
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
"{}",
Expand Down
2 changes: 1 addition & 1 deletion src/walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 8c17756

Please sign in to comment.