Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
kimono-koans committed Jan 5, 2024
1 parent c2c19d3 commit 1e25b61
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/lookup/deleted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,8 @@ impl DeletedFiles {
// compare local filenames to all unique snap filenames - none values are unique, here
let all_deleted_versions = unique_snap_filenames
.into_iter()
.filter_map(move |(file_name, basic_info)| {
if local_filenames_set.contains(&file_name) {
None
} else {
Some(basic_info)
}
})
.filter(|(file_name, _basic_info)| !local_filenames_set.contains(file_name))
.map(|(_file_name, basic_info)| basic_info)
.collect();

Ok(all_deleted_versions)
Expand Down

0 comments on commit 1e25b61

Please sign in to comment.