perf: RuleTable::any_enabled (#10971)

This commit is contained in:
Micha Reiser 2024-04-16 14:20:27 +02:00 committed by GitHub
parent f779babc5f
commit d4e140d47f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 1 deletions

View file

@ -31,7 +31,7 @@ impl RuleTable {
/// Returns whether any of the given rules should be checked.
#[inline]
pub const fn any_enabled(&self, rules: &[Rule]) -> bool {
self.enabled.intersects(&RuleSet::from_rules(rules))
self.enabled.any(rules)
}
/// Returns whether violations of the given rule should be fixed.