summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSharif Haason <ssh128@scarletmail.rutgers.edu>2023-06-13 16:38:55 -0400
committerSharif Haason <ssh128@scarletmail.rutgers.edu>2023-12-10 13:21:23 -0500
commitc4f91959efc0b67f6b944fb6e7212073ed091d3b (patch)
tree15d7eddf5377915cc71bca15e7ba8869f644d845
parent4e663576189b24d0652128bdb22daef963ab1eec (diff)
Add default value for character table
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
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::<String>("character-table")
- .unwrap_or(&String::from("ascii-only"))
+ .unwrap()
.as_ref()
{
"ascii-only" => CharTable::AsciiOnly,