Skip to content

Commit

Permalink
Remove unnecessary allocation (#2495)
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus-consoli authored May 17, 2024
1 parent 9d47af8 commit ce3d4ff
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions core/crates/indexer-rules/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,6 @@ impl IndexerRuler {
pub async fn has_system(&self, rule: &SystemIndexerRule) -> bool {
let rules = self.rules.read().await;

rules
.iter()
.map(|rule| (rule.id, rule.name.clone()))
.collect::<Vec<(Option<i32>, String)>>();
rules.iter().any(|inner_rule| rule == inner_rule)
}
}
Expand Down

0 comments on commit ce3d4ff

Please sign in to comment.