fix outdated cache after removing rules
This commit is contained in:
parent
0611be2837
commit
3cadbb0984
1 changed files with 1 additions and 3 deletions
|
@ -404,6 +404,7 @@ impl Dish {
|
|||
// remove old cache for this rule, since the variants may have changed
|
||||
self.cache.retain(|c| c.rule != rule_index);
|
||||
self.add_cache_single_rule(rule_index);
|
||||
self.update_match_cache();
|
||||
}
|
||||
|
||||
/// run after adding a rule
|
||||
|
@ -434,9 +435,6 @@ impl Dish {
|
|||
}
|
||||
}
|
||||
}
|
||||
if !matches.is_empty() {
|
||||
self.match_cache.push(self.cache.len());
|
||||
}
|
||||
self.cache.push(RuleCache {
|
||||
rule: rule_index,
|
||||
variant: variant_index,
|
||||
|
|
Loading…
Reference in a new issue