Skip to content

Commit

Permalink
ui/common: Simplify kv-matching code
Browse files Browse the repository at this point in the history
  • Loading branch information
dimtpap committed Sep 30, 2023
1 parent f13f747 commit 28e96a2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ui/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,10 @@ mod kv_matcher {
iter: impl Iterator<Item = (impl AsRef<str>, impl AsRef<str>)> + Clone,
) -> bool {
for (key_filter, value_filter) in &self.filters {
if iter
if !iter
.clone()
.any(|(k, v)| key_filter.test(k.as_ref()) && value_filter.test(v.as_ref()))
{
continue;
} else {
return false;
}
}
Expand Down

0 comments on commit 28e96a2

Please sign in to comment.