From ac5ac7fe1a0f8e9eb052f4f4ebc0857b808cfe13 Mon Sep 17 00:00:00 2001 From: DustInDark Date: Tue, 7 Jun 2022 19:48:47 +0900 Subject: [PATCH] fixed cargo clippy --- src/detections/pivot.rs | 2 +- src/detections/print.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detections/pivot.rs b/src/detections/pivot.rs index 391590c0..c732ddfa 100644 --- a/src/detections/pivot.rs +++ b/src/detections/pivot.rs @@ -57,7 +57,7 @@ pub fn insert_pivot_keyword(event_record: &Value) { } else { return; } - let mut pivots = PIVOT_KEYWORD.write().unwrap(); + let mut pivots = PIVOT_KEYWORD.write().unwrap().clone(); for (_, pivot) in pivots.iter_mut() { for field in &pivot.fields { if let Some(array_str) = configs::EVENTKEY_ALIAS.get_event_key(&String::from(field)) { diff --git a/src/detections/print.rs b/src/detections/print.rs index de607eec..0f83b02e 100644 --- a/src/detections/print.rs +++ b/src/detections/print.rs @@ -252,7 +252,7 @@ impl AlertMessage { .as_bytes(), ) .ok(); - let error_logs = ERROR_LOG_STACK.lock().unwrap(); + let error_logs = ERROR_LOG_STACK.lock().unwrap().clone(); for error_log in error_logs.iter() { writeln!(error_log_writer, "{}", error_log).ok(); }