From 7fc82adc1cf8b5b6e1c748cc89eacaa1f2879e8a Mon Sep 17 00:00:00 2001 From: emma Date: Fri, 24 Mar 2023 19:42:34 -0400 Subject: [PATCH] fixed usage information --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index a5d12b0..b2fd80a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -107,16 +107,17 @@ fn parse_toml( fn main() { let argv: Vec = env::args().collect(); + let usage_info = format!("Usage: {} [table.]key[[index]] [file...]", argv[0]); if argv.len() <= 1 { - eprintln!("Usage: {} [table...].[value[index]] [file...]", argv[0]); + eprintln!(, argv[0]); exit(64); // sysexits(3) EX_USAGE } let input = match argv.get(2) { Some(val) => val, None => { - eprintln!("Usage: {} [table...].[value[index]] [file...]", argv[0]); + eprintln!("{}", usage_info); exit(EX_USAGE); }, };