Skip to content

Commit

Permalink
Fix rustfmt errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxxcode committed Oct 24, 2024
1 parent 51bc7b9 commit 3e8a7e9
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/data/directory_content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,18 @@ impl DirectoryContent {
&'s self,
search_value: &'s str,
) -> impl Iterator<Item = &'s DirectoryEntry> + 's {
self.content.iter().filter(|p| apply_search_value(p, search_value))
self.content
.iter()
.filter(|p| apply_search_value(p, search_value))
}

pub fn filtered_iter_mut<'s>(
&'s mut self,
search_value: &'s str,
) -> impl Iterator<Item = &'s mut DirectoryEntry> + 's {
self.content.iter_mut().filter(|p| apply_search_value(p, search_value))
self.content
.iter_mut()
.filter(|p| apply_search_value(p, search_value))
}

pub fn reset_multi_selection(&mut self) {
Expand All @@ -173,7 +177,11 @@ impl DirectoryContent {
}

fn apply_search_value(entry: &DirectoryEntry, value: &str) -> bool {
value.is_empty() || entry.file_name().to_lowercase().contains(&value.to_lowercase())
value.is_empty()
|| entry
.file_name()
.to_lowercase()
.contains(&value.to_lowercase())
}

/// Loads the contents of the given directory.
Expand Down

0 comments on commit 3e8a7e9

Please sign in to comment.