mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 03:32:38 +08:00
perf: preKeys
This commit is contained in:
parent
c871333537
commit
02f6d07423
|
@ -16,8 +16,7 @@ sealed class ResolvedRule(
|
|||
) {
|
||||
val key = rule.key
|
||||
val index = group.rules.indexOf(rule)
|
||||
val othersKeys = group.rules.filter { r -> r.key != rule.key }.mapNotNull { r -> r.key }.toSet()
|
||||
val preKeys = (rule.preKeys ?: emptyList()).filter { r -> othersKeys.contains(r) }.toSet()
|
||||
val preKeys = (rule.preKeys ?: emptyList()).toSet()
|
||||
val resetMatch = rule.resetMatch ?: group.resetMatch
|
||||
val matches = rule.matches.map { s -> Selector.parse(s) }
|
||||
val excludeMatches = (rule.excludeMatches ?: emptyList()).map { s -> Selector.parse(s) }
|
||||
|
|
Loading…
Reference in New Issue
Block a user