From 240f80f89e62394fd8e2c1e265b4eb15a4793ae7 Mon Sep 17 00:00:00 2001 From: fukusuket <41001169+fukusuket@users.noreply.github.com> Date: Mon, 21 Oct 2024 21:10:13 -0400 Subject: [PATCH] fix: clippy error --- src/detections/detection.rs | 8 ++++---- src/timeline/search.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/detections/detection.rs b/src/detections/detection.rs index c6700d9b0..665f85c8d 100644 --- a/src/detections/detection.rs +++ b/src/detections/detection.rs @@ -344,7 +344,7 @@ impl Detection { .replace_all( stored_static .ch_config - .get(&CompactString::from(ch_str.to_ascii_lowercase())) + .get(&ch_str.to_ascii_lowercase()) .unwrap_or(ch_str) .as_str(), &stored_static.disp_abbr_general_values, @@ -722,7 +722,7 @@ impl Detection { FieldDataMapKey::default() } else { FieldDataMapKey { - channel: CompactString::from(ch_str.clone().to_lowercase()), + channel: ch_str.clone().to_lowercase(), event_id: eid.clone(), } }; @@ -1160,8 +1160,8 @@ impl Detection { let enable_deprecated_flag = output_opt.enable_deprecated_rules; let enable_unsupported_flag = output_opt.enable_unsupported_rules; let is_filtered_rule_flag = |x: &CompactString| { - x == &"deprecated" && !enable_deprecated_flag - || x == &"unsupported" && !enable_unsupported_flag + x == "deprecated" && !enable_deprecated_flag + || x == "unsupported" && !enable_unsupported_flag }; let total_loaded_rule_cnt: u128 = sorted_st_rc .iter() diff --git a/src/timeline/search.rs b/src/timeline/search.rs index e20f66ab4..603746414 100644 --- a/src/timeline/search.rs +++ b/src/timeline/search.rs @@ -415,7 +415,7 @@ pub fn search_result_dsp_msg( let abbr_channel = stored_static.disp_abbr_generic.replace_all( stored_static .ch_config - .get(&CompactString::from(channel.to_ascii_lowercase())) + .get(&channel.to_ascii_lowercase()) .unwrap_or(&channel) .as_str(), &stored_static.disp_abbr_general_values,