From b49e27455140779e038518c41fc42a381bc629c6 Mon Sep 17 00:00:00 2001 From: DustInDark Date: Mon, 13 Jun 2022 02:58:06 +0900 Subject: [PATCH] removed unnecessary default data. due to clap derive default value #413 --- src/detections/configs.rs | 2 +- src/main.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/detections/configs.rs b/src/detections/configs.rs index de3999ac..843aa35b 100644 --- a/src/detections/configs.rs +++ b/src/detections/configs.rs @@ -203,7 +203,7 @@ impl ConfigReader<'_> { pub fn new() -> Self { let build_cmd = Config::command(); let arg = build_cmd.clone().get_matches(); - let folder_path_str = arg.value_of("config").unwrap_or("rules/config").to_string(); + let folder_path_str = arg.value_of("config").unwrap().to_string(); ConfigReader { cmd: build_cmd, args: arg, diff --git a/src/main.rs b/src/main.rs index 3080386f..c6b235dc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -249,7 +249,7 @@ impl App { .unwrap() .args .value_of("level-tuning") - .unwrap_or("./rules/config/level_tuning.txt") + .unwrap() .to_string(); if Path::new(&level_tuning_config_path).exists() { @@ -260,7 +260,7 @@ impl App { .unwrap() .args .value_of("rules") - .unwrap_or("rules"), + .unwrap(), ) { AlertMessage::alert(&err).ok(); } @@ -433,7 +433,7 @@ impl App { .unwrap() .args .value_of("min-level") - .unwrap_or("informational") + .unwrap() .to_uppercase(); write_color_buffer( BufferWriter::stdout(ColorChoice::Always),