From 129db6f76cb5df8bd28b771bd9974b53a03670ae Mon Sep 17 00:00:00 2001 From: ichiichi11 Date: Sun, 22 Nov 2020 11:18:21 +0900 Subject: [PATCH] refactoring --- src/detections/detection.rs | 2 +- src/detections/rule.rs | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/detections/detection.rs b/src/detections/detection.rs index e0d8e3da..c958f931 100644 --- a/src/detections/detection.rs +++ b/src/detections/detection.rs @@ -6,7 +6,7 @@ use crate::detections::rule; use crate::detections::rule::RuleNode; use crate::yaml::ParseYaml; -use chrono::{DateTime, FixedOffset, ParseError, ParseResult, TimeZone, Utc}; +use chrono::{DateTime, FixedOffset, TimeZone, Utc}; use evtx::EvtxParser; use serde_json::{Error, Value}; diff --git a/src/detections/rule.rs b/src/detections/rule.rs index db1d249e..dfe48b8b 100644 --- a/src/detections/rule.rs +++ b/src/detections/rule.rs @@ -268,16 +268,6 @@ impl LeafSelectionNode { fn get_matchers(&self) -> Vec> { return vec![Box::new(RegexMatcher::new())]; } - - // LeafMatcherを取得する。 - fn get_matcher(&self) -> Option> { - let matchers = self.get_matchers(); - let mut match_key_list = self.key_list.clone(); - match_key_list.remove(0); - return matchers - .into_iter() - .find(|matcher| matcher.is_target_key(&match_key_list)); - } } impl SelectionNode for LeafSelectionNode {