From 11ac86f88265e1ab43c258a32918a40ec731eb16 Mon Sep 17 00:00:00 2001 From: Mr Nouse Date: Mon, 1 Aug 2022 19:05:11 +0200 Subject: [PATCH] cli: suppress unused option PrintFmt::Off --- README.md | 2 +- src/main.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7f06779..d0eb6e7 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ FLAGS: OPTIONS: -b, --blocksize Sets the display blocksize to Bytes, Kilobytes, Megabytes or Gigabytes. Default is Kilobytes. [possible values: B, K, M, G] - -f, --format Sets output format. [possible values: standard, json, off] + -f, --format Sets output format. [possible values: standard, json] -o, --output Sets file to save all output. Use 'no' for no file output. -v, --verbosity Sets verbosity for printed output. [possible values: quiet, duplicates, all] diff --git a/src/main.rs b/src/main.rs index 765ce51..6f6b516 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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); }