From 9b5f243ff9a6579ecd640a70ba274103f2601ed5 Mon Sep 17 00:00:00 2001 From: ichiichi11 Date: Mon, 30 Nov 2020 21:52:56 +0900 Subject: [PATCH] refactoring --- src/detections/rule.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detections/rule.rs b/src/detections/rule.rs index 161e0462..c65e492a 100644 --- a/src/detections/rule.rs +++ b/src/detections/rule.rs @@ -85,7 +85,7 @@ impl RuleNode { let mut errmsgs: Vec = vec![]; // field check - if self.yaml["output"].as_str().is_none() { + if self.yaml["output"].as_str().unwrap_or("").is_empty() { errmsgs.push("Cannot find required key. key:output".to_string()); }