Remove unnecessary allocation (#2495)

This commit is contained in:
Consoli 2024-05-17 13:10:43 -03:00 committed by GitHub
parent 9d47af8bd1
commit ce3d4ff7a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
}
}