mirror of
https://github.com/sharkdp/fd.git
synced 2026-09-01 15:12:46 +08:00
chore: Fix clippy lints
Use is_some_and instead of map_or(false
This commit is contained in:
+1
-1
@@ -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
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user