Skip to content

Commit

Permalink
variable rename for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
hcaumeil committed Aug 3, 2023
1 parent 0acf06d commit 3feeca8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/src/router/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,10 @@ impl DomainRule {
DomainRule::Exact(s) => s.as_bytes() == hostname,
DomainRule::Regex(r) => {
let start = Instant::now();
let res = r.is_match(hostname);
let is_a_match = r.is_match(hostname);
let now = Instant::now();
time!("regex_matching_time", (now - start).whole_milliseconds());
res
is_a_match
}
}
}
Expand Down Expand Up @@ -502,11 +502,11 @@ impl PathRule {
}
PathRule::Regex(r) => {
let start = Instant::now();
let res = r.is_match(path);
let is_a_match = r.is_match(path);
let now = Instant::now();
time!("regex_matching_time", (now - start).whole_milliseconds());

if res {
if is_a_match {
PathRuleResult::Regex
} else {
PathRuleResult::None
Expand Down

0 comments on commit 3feeca8

Please sign in to comment.