Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/find/matchers/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ pub fn get_file_system_type(path: &Path, cache: &RefCell<Option<Cache>>) -> URes
let fs_list = uucore::fsext::read_fs_list()?;
let result = fs_list
.into_iter()
.find(|fs| fs.dev_id == dev_id)
.filter(|fs| fs.dev_id == dev_id)
.next_back()
.map_or_else(String::new, |fs| fs.fs_type);

// cache the latest query if not a match before
Expand Down
3 changes: 2 additions & 1 deletion src/find/matchers/printf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@
uucore::fsext::read_fs_list().expect("Could not find the filesystem info");
fs_list
.into_iter()
.find(|fs| fs.dev_id == dev_id)
.filter(|fs| fs.dev_id == dev_id)
.next_back()

Check warning on line 455 in src/find/matchers/printf.rs

View check run for this annotation

Codecov / codecov/patch

src/find/matchers/printf.rs#L454-L455

Added lines #L454 - L455 were not covered by tests
.map_or_else(String::new, |fs| fs.fs_type)
.into()
}
Expand Down
Loading