making linters happy
Some checks failed
CI / Rust Blocking Checks (push) Failing after 22s
CI / Web Blocking Checks (push) Failing after 26s
CI / Security Blocking Checks (push) Successful in 9s
CI / Web Advisory Checks (push) Successful in 32s
CI / Security Advisory Checks (push) Has been cancelled

This commit is contained in:
2026-03-04 23:44:45 -06:00
parent 6a5a3c2b78
commit 13749409cd
81 changed files with 468 additions and 599 deletions

View File

@@ -189,7 +189,7 @@ impl EventProcessor {
let payload_dict = payload
.as_object()
.cloned()
.unwrap_or_else(|| serde_json::Map::new());
.unwrap_or_else(serde_json::Map::new);
// Resolve action parameters using the template resolver
let resolved_params = Self::resolve_action_params(pool, rule, event, &payload).await?;
@@ -248,7 +248,7 @@ impl EventProcessor {
};
// If rule has no conditions, it always matches
if rule.conditions.is_null() || rule.conditions.as_array().map_or(true, |a| a.is_empty()) {
if rule.conditions.is_null() || rule.conditions.as_array().is_none_or(|a| a.is_empty()) {
debug!("Rule {} has no conditions, matching by default", rule.r#ref);
return Ok(true);
}
@@ -364,7 +364,7 @@ impl EventProcessor {
let action_params = &rule.action_params;
// If there are no action params, return empty
if action_params.is_null() || action_params.as_object().map_or(true, |o| o.is_empty()) {
if action_params.is_null() || action_params.as_object().is_none_or(|o| o.is_empty()) {
return Ok(serde_json::Map::new());
}