From c4f91959efc0b67f6b944fb6e7212073ed091d3b Mon Sep 17 00:00:00 2001 From: Sharif Haason Date: Tue, 13 Jun 2023 16:38:55 -0400 Subject: Add default value for character table --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 66b1a32..7cee640 100644 --- a/src/main.rs +++ b/src/main.rs @@ -217,6 +217,7 @@ fn run() -> Result<()> { .long("character-table") .value_name("FORMAT") .value_parser(["codepage-437", "ascii-only"]) + .default_value("ascii-only") .help( "The character table that should be used. 'ascii-only' \ will show dots for non-ASCII characters, and 'codepage-437 \ @@ -483,7 +484,7 @@ fn run() -> Result<()> { let char_table = match matches .get_one::("character-table") - .unwrap_or(&String::from("ascii-only")) + .unwrap() .as_ref() { "ascii-only" => CharTable::AsciiOnly, -- cgit v1.2.3