removed unnecessary default data. due to clap derive default value #413

This commit is contained in:
DustInDark
2022-06-13 02:58:06 +09:00
parent 0f30ae8172
commit b49e274551
2 changed files with 4 additions and 4 deletions

View File

@@ -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,

View File

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