cli: suppress unused option PrintFmt::Off

This commit is contained in:
Mr Nouse 2022-08-01 19:05:11 +02:00
parent e1fc3fb949
commit 11ac86f882
2 changed files with 2 additions and 5 deletions

View file

@ -45,7 +45,7 @@ FLAGS:
OPTIONS:
-b, --blocksize <Blocksize> Sets the display blocksize to Bytes, Kilobytes, Megabytes or Gigabytes. Default is
Kilobytes. [possible values: B, K, M, G]
-f, --format <Format> Sets output format. [possible values: standard, json, off]
-f, --format <Format> Sets output format. [possible values: standard, json]
-o, --output <Output> Sets file to save all output. Use 'no' for no file output.
-v, --verbosity <Verbosity> Sets verbosity for printed output. [possible values: quiet, duplicates, all]

View file

@ -10,7 +10,6 @@ use std::path::PathBuf;
pub enum PrintFmt {
Standard,
Json,
Off,
}
pub enum Verbosity {
@ -66,7 +65,7 @@ fn main() {
.arg(Arg::new("Format")
.short('f')
.long("format")
.possible_values(&["standard", "json", "off"])
.possible_values(&["standard", "json"])
.takes_value(true)
.max_values(1)
.help("Sets output format."))
@ -242,7 +241,6 @@ fn process_full_output(
serde_json::to_string(complete_files).unwrap_or_else(|_| "".to_string())
);
}
_ => {}
}
match arguments.value_of("Output").unwrap_or("Results.txt") {
@ -336,7 +334,6 @@ fn write_results_to_file(
))
.unwrap();
}
PrintFmt::Off => return,
}
println!("{:#?} results written to {}", fmt, file);
}