diff --git a/src/detections/detection.rs b/src/detections/detection.rs index 6aaa6179..71edb905 100644 --- a/src/detections/detection.rs +++ b/src/detections/detection.rs @@ -13,8 +13,8 @@ use crate::detections::utils::get_serde_number_to_string; use crate::filter; use crate::yaml::ParseYaml; use hashbrown; +use hashbrown::HashMap; use serde_json::Value; -use std::collections::HashMap; use std::io::BufWriter; use std::sync::Arc; use tokio::{runtime::Runtime, spawn, task::JoinHandle}; diff --git a/src/detections/rule/condition_parser.rs b/src/detections/rule/condition_parser.rs index d6f02e03..a2e7e8f2 100644 --- a/src/detections/rule/condition_parser.rs +++ b/src/detections/rule/condition_parser.rs @@ -5,7 +5,8 @@ use self::selectionnodes::{ AndSelectionNode, NotSelectionNode, OrSelectionNode, RefSelectionNode, SelectionNode, }; use super::selectionnodes; -use std::{collections::HashMap, sync::Arc}; +use hashbrown::HashMap; +use std::sync::Arc; lazy_static! { pub static ref CONDITION_REGEXMAP: Vec = vec![ diff --git a/src/detections/rule/mod.rs b/src/detections/rule/mod.rs index 3c7b328b..be9c871c 100644 --- a/src/detections/rule/mod.rs +++ b/src/detections/rule/mod.rs @@ -3,7 +3,8 @@ use crate::detections::print::Message; use chrono::{DateTime, Utc}; -use std::{collections::HashMap, fmt::Debug, sync::Arc, vec}; +use hashbrown::HashMap; +use std::{fmt::Debug, sync::Arc, vec}; use yaml_rust::Yaml; diff --git a/src/filter.rs b/src/filter.rs index f562f60b..2d202613 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -2,9 +2,9 @@ use crate::detections::configs; use crate::detections::print::AlertMessage; use crate::detections::print::ERROR_LOG_STACK; use crate::detections::print::QUIET_ERRORS_FLAG; +use hashbrown::HashSet; use lazy_static::lazy_static; use regex::Regex; -use std::collections::HashSet; use std::fs::File; use std::io::BufWriter; use std::io::{BufRead, BufReader}; diff --git a/src/timeline/statistics.rs b/src/timeline/statistics.rs index 7aca3a03..492600b0 100644 --- a/src/timeline/statistics.rs +++ b/src/timeline/statistics.rs @@ -1,5 +1,5 @@ use crate::detections::{configs, detection::EvtxRecordInfo, utils}; -use std::collections::HashMap; +use hashbrown::HashMap; #[derive(Debug)] pub struct EventStatistics { diff --git a/src/timeline/timeline.rs b/src/timeline/timeline.rs index 5b0a9c57..5657fb3b 100644 --- a/src/timeline/timeline.rs +++ b/src/timeline/timeline.rs @@ -1,7 +1,7 @@ use crate::detections::{configs, detection::EvtxRecordInfo}; use super::statistics::EventStatistics; -use std::collections::HashMap; +use hashbrown::HashMap; #[derive(Debug)] pub struct Timeline { diff --git a/src/yaml.rs b/src/yaml.rs index ffec4f1e..5e4bc087 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -6,7 +6,7 @@ use crate::detections::print::AlertMessage; use crate::detections::print::ERROR_LOG_STACK; use crate::detections::print::QUIET_ERRORS_FLAG; use crate::filter::RuleExclude; -use std::collections::HashMap; +use hashbrown::HashMap; use std::ffi::OsStr; use std::fs; use std::io; @@ -269,7 +269,7 @@ mod tests { use crate::filter; use crate::yaml; use crate::yaml::RuleExclude; - use std::collections::HashSet; + use hashbrown::HashSet; use std::path::Path; use yaml_rust::YamlLoader;