replaced unnecessary clone use

This commit is contained in:
DustInDark
2022-06-07 20:55:01 +09:00
parent 9362e81f53
commit 4220a9b5e2
3 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ use std::sync::RwLock;
use crate::detections::configs;
use crate::detections::utils::get_serde_number_to_string;
#[derive(Debug, Clone)]
#[derive(Debug)]
pub struct PivotKeyword {
pub keywords: HashSet<String>,
pub fields: HashSet<String>,
+3 -3
View File
@@ -252,10 +252,10 @@ impl AlertMessage {
.as_bytes(),
)
.ok();
let error_logs = ERROR_LOG_STACK.lock().unwrap().clone();
for error_log in error_logs.iter() {
let error_logs = ERROR_LOG_STACK.lock().unwrap();
error_logs.iter().for_each(|error_log| {
writeln!(error_log_writer, "{}", error_log).ok();
}
});
println!(
"Errors were generated. Please check {} for details.",
*ERROR_LOG_PATH