Skip to content

Commit

Permalink
fixup! perf(*): cache regex predicates with rc using router attribute
Browse files Browse the repository at this point in the history
PR Review
  • Loading branch information
nowNick committed Sep 26, 2024
1 parent 2375129 commit e78ee56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ fn parse_predicate(
if let Value::String(s) = rhs {
let regex_rc = match regex_cache.get(&s) {
Some(stored_regex_rc) => stored_regex_rc.clone(),
_ => {
None => {
let r = Regex::new(&s).into_parse_result(&rhs_pair)?;

let rc = Rc::new(r);
Expand Down

0 comments on commit e78ee56

Please sign in to comment.