removed unnecessary default data. due to clap derive default value #413
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user