[engine/matcher] lazy evaluate second argument on equal operator
@@ -31,8 +31,12 @@ impl Operator for Equal {
extracted_vars: Option<&HashMap<String, Value>>,
) -> bool {
let first = self.first_arg.get(event, extracted_vars);
+ if first.is_some() {
let second = self.second_arg.get(event, extracted_vars);
- first.is_some() && second.is_some() && (first == second)
+ second.is_some() && (first == second)
+ } else {
+ false
+ }
}
}
