Skip to content

Commit

Permalink
chore: fixed clippy lint warning #1335
Browse files Browse the repository at this point in the history
  • Loading branch information
hitenkoku committed May 2, 2024
1 parent e9e2034 commit c0ac07f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 7 additions & 3 deletions src/afterfact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@ fn emit_csv_inner(
remove_duplicate_data,
);
afterfact_info.prev_message = result.1;
afterfact_info.prev_details_convert_map = detect_info.details_convert_map.clone();
afterfact_info
.prev_details_convert_map
.clone_from(&detect_info.details_convert_map);
if afterfact_writer.display_flag {
write_color_buffer(
&afterfact_writer.disp_wtr,
Expand All @@ -404,7 +406,9 @@ fn emit_csv_inner(
remove_duplicate_data,
);
afterfact_info.prev_message = result.1;
afterfact_info.prev_details_convert_map = detect_info.details_convert_map.clone();
afterfact_info
.prev_details_convert_map
.clone_from(&detect_info.details_convert_map);
if afterfact_writer.display_flag {
write_color_buffer(
&afterfact_writer.disp_wtr,
Expand Down Expand Up @@ -1806,7 +1810,7 @@ pub fn output_json_str(
}
}
} else {
target_ext_field = detect_info.ext_field.to_owned();
target_ext_field.clone_from(&detect_info.ext_field);
}
let key_add_to_details = [
"SrcASN",
Expand Down
4 changes: 2 additions & 2 deletions src/detections/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,10 @@ pub fn create_rec_info(

if !*no_pwsh_field_extraction {
if key == "EventID" {
event_id = val.clone();
event_id.clone_from(&val);
}
if key == "Channel" {
channel = val.clone();
channel.clone_from(&val);
}
}
key_2_values.insert(key.to_string(), val.unwrap());
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ use std::path::Path;
use std::ptr::null_mut;
use std::sync::Arc;
use std::time::Duration;
use std::u128;
use std::{
env,
fs::{self, File},
Expand Down

0 comments on commit c0ac07f

Please sign in to comment.