Use atomics instead of mutexes
Use atomics instead of mutexes to improve access on metrics. Therefor also remove unneeded borrows.
This commit is contained in:
parent
b4b46ebd58
commit
a122bf28d2
2 changed files with 38 additions and 57 deletions
|
@ -74,7 +74,7 @@ impl JsonFilter {
|
|||
let regex = Regex::new(&self.regex).map_err(WebhookeyError::Regex)?;
|
||||
|
||||
if let Some(value) = data.pointer(&self.pointer) {
|
||||
if regex.is_match(&self.get_string(&value)?) {
|
||||
if regex.is_match(&self.get_string(value)?) {
|
||||
debug!("Regex `{}` for `{}` matches", &self.regex, &self.pointer);
|
||||
|
||||
return Ok(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue