From b9189f8e3116b582052a9c305d12710fa6570cf8 Mon Sep 17 00:00:00 2001 From: kazuminn Date: Sun, 6 Dec 2020 22:28:00 +0900 Subject: [PATCH 1/2] refactor --- src/detections/detection.rs | 1 - src/main.rs | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/detections/detection.rs b/src/detections/detection.rs index ff02f665..0dd617b8 100644 --- a/src/detections/detection.rs +++ b/src/detections/detection.rs @@ -1,4 +1,3 @@ -extern crate chrono; extern crate csv; use std::path::PathBuf; diff --git a/src/main.rs b/src/main.rs index 8eec1241..7796b406 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,15 +1,13 @@ extern crate serde; -#[macro_use] extern crate serde_derive; -use quick_xml::de::DeError; use std::{fs, path::PathBuf}; use yamato_event_analyzer::afterfact::after_fact; use yamato_event_analyzer::detections::configs; use yamato_event_analyzer::detections::detection; use yamato_event_analyzer::omikuji::Omikuji; -fn main() -> Result<(), DeError> { +fn main() { if let Some(filepath) = configs::singleton().args.value_of("filepath") { detect_files(vec![PathBuf::from(filepath)]); } else if let Some(directory) = configs::singleton().args.value_of("directory") { @@ -18,8 +16,6 @@ fn main() -> Result<(), DeError> { } after_fact(); - - Ok(()) } fn collect_evtxfiles(dirpath: &str) -> Vec { From d94d18f9cd1c8291f985e519786138104f1557e8 Mon Sep 17 00:00:00 2001 From: kazuminn Date: Sun, 6 Dec 2020 22:50:20 +0900 Subject: [PATCH 2/2] refactor --- src/yaml.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yaml.rs b/src/yaml.rs index 781a5100..43a84a52 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -47,7 +47,7 @@ impl ParseYaml { }; } if entry.file_type().ok()?.is_dir() { - self.read_dir(entry.path()); + let _ = self.read_dir(entry.path()); } Some("") })