find: fix clippy::single_match_else

This commit is contained in:
Sylvestre Ledru
2026-06-08 22:48:45 +02:00
parent baa6ce5d92
commit 47796303ca
+10 -11
View File
@@ -94,18 +94,17 @@ impl FileSystemMatcher {
impl Matcher for FileSystemMatcher {
#[cfg(unix)]
fn matches(&self, file_info: &WalkEntry, _: &mut MatcherIO) -> bool {
match get_file_system_type(file_info.path(), &self.cache) {
Ok(result) => result == self.fs_text,
Err(_) => {
writeln!(
&mut stderr(),
"Error getting filesystem type for {}",
file_info.path().to_string_lossy()
)
.unwrap();
if let Ok(result) = get_file_system_type(file_info.path(), &self.cache) {
result == self.fs_text
} else {
writeln!(
&mut stderr(),
"Error getting filesystem type for {}",
file_info.path().to_string_lossy()
)
.unwrap();
false
}
false
}
}