fixed cargo clippy

This commit is contained in:
DustInDark
2022-06-07 19:48:47 +09:00
parent eded81e39b
commit ac5ac7fe1a
2 changed files with 2 additions and 2 deletions

View File

@@ -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)) {

View File

@@ -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();
}