Skip to content

Commit

Permalink
Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryAstafyev committed May 8, 2024
1 parent 6c8dbc0 commit 21572b8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ impl RegularSearchHolder {
pub fn setup(&mut self, filters: Vec<SearchFilter>) -> Result<(), SearchError> {
let invalid = filters
.iter()
.filter_map(|f| if f.valid() { None } else { Some(&f.value) })
.filter(|&f| f.valid())
.map(|f| &f.value)
.cloned()
.collect::<Vec<String>>()
.join("; ");
Expand Down

0 comments on commit 21572b8

Please sign in to comment.