Skip to content

Commit

Permalink
Remove unnecessary allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus-consoli committed May 17, 2024
1 parent 26b6baf commit 49adae5
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 49adae5

Please sign in to comment.