Skip to content

Commit

Permalink
style: fixed cargo clippy error
Browse files Browse the repository at this point in the history
  • Loading branch information
hitenkoku committed Nov 27, 2023
1 parent f462d10 commit 71ef72b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 67 deletions.
7 changes: 3 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ impl App {
}

Check warning on line 1083 in src/main.rs

View check run for this annotation

Codecov / codecov/patch

src/main.rs#L1066-L1083

Added lines #L1066 - L1083 were not covered by tests
}
} else {
ret_cnt += value.iter().map(|(t, cnt)| cnt).sum::<i128>()
ret_cnt += value.iter().map(|(_, cnt)| cnt).sum::<i128>()

Check warning on line 1086 in src/main.rs

View check run for this annotation

Codecov / codecov/patch

src/main.rs#L1086

Added line #L1086 was not covered by tests
}
}
});
Expand All @@ -1106,14 +1106,13 @@ impl App {
let sections_rule_cnt = selections_status
.iter()
.map(|(_, (status, min_level))| {
let ret = calcurate_wizard_rule_count(
calcurate_wizard_rule_count(
false,
["excluded", "deprecated", "unsupported", "noisy"].to_vec(),
min_level,
status.to_vec(),
[].to_vec(),
);
ret
)
})
.collect_vec();
let selection_status_items = &[
Expand Down
63 changes: 0 additions & 63 deletions src/options/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,69 +414,6 @@ mod tests {

#[test]
fn test_get_profile_list_err_load() {
let dummy_stored_static =
create_dummy_stored_static(Action::CsvTimeline(CsvOutputOption {
output_options: OutputOption {
input_args: InputOption {
directory: None,
filepath: None,
live_analysis: false,
recover_records: false,
timeline_offset: None,
},
profile: None,
enable_deprecated_rules: false,
exclude_status: None,
min_level: "informational".to_string(),
exact_level: None,
enable_noisy_rules: false,
end_timeline: None,
start_timeline: None,
eid_filter: false,
european_time: false,
iso_8601: false,
rfc_2822: false,
rfc_3339: false,
us_military_time: false,
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
html_report: None,
no_summary: false,
common_options: CommonOptions {
no_color: false,
quiet: false,
},
detect_common_options: DetectCommonOption {
evtx_file_ext: None,
thread_number: None,
quiet_errors: false,
config: Path::new("./rules/config").to_path_buf(),
verbose: false,
json_input: false,
include_computer: None,
exclude_computer: None,
},
enable_unsupported_rules: false,
clobber: false,
proven_rules: false,
include_tag: None,
exclude_tag: None,
include_category: None,
exclude_category: None,
include_eid: None,
exclude_eid: None,
no_field: false,
no_pwsh_field_extraction: false,
remove_duplicate_data: false,
remove_duplicate_detections: false,
no_wizard: true,
},
geo_ip: None,
output: None,
multiline: false,
}));
assert_eq!(
Nested::<Vec<String>>::new(),
get_profile_list("test_files/not_exist_path")
Expand Down

0 comments on commit 71ef72b

Please sign in to comment.