Browse Source

main: fix bad usage error handling

master
Matteo Cypriani 3 years ago
parent
commit
bdca31c3fd
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      src/main.rs

+ 5
- 2
src/main.rs View File

@@ -55,8 +55,11 @@ fn main_main() -> i32 {
"print this help message");

let options = match opts.parse(&args[1..]) {
Ok(m) => m,
Err(err) => panic!(err),
Ok(options) => options,
Err(_) => {
print_usage(&prog_name, &opts);
return 1;
},
};

if options.opt_present("help") {


Loading…
Cancel
Save