mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 04:45:01 +00:00
perf: RuleTable::any_enabled
(#10971)
This commit is contained in:
parent
f779babc5f
commit
d4e140d47f
2 changed files with 16 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue