diff options
| author | Teddy Wing | 2018-10-26 04:46:05 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2018-10-26 04:46:05 +0200 | 
| commit | 775344e98cb3f88c3c1339bb7bd4998ca6d33b93 (patch) | |
| tree | 03ac74f4f2d3785f0942e3eae833c1c798655395 /src | |
| parent | d5e89508c97eda58e76766c4dbaa605905727268 (diff) | |
| download | dome-key-map-775344e98cb3f88c3c1339bb7bd4998ca6d33b93.tar.bz2 | |
print_usage(): Exit after printing usage
Otherwise we might end up printing things like error messages from the
license check. Not very nice-looking to have that after the help message
output.
Diffstat (limited to 'src')
| -rw-r--r-- | src/config.rs | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/src/config.rs b/src/config.rs index 6b9d673..01cc379 100644 --- a/src/config.rs +++ b/src/config.rs @@ -2,6 +2,7 @@ use std::ffi::CString;  use std::fs;  use std::ptr; +use exitcode;  use libc::c_char;  use getopts::Options;  use toml; @@ -52,6 +53,8 @@ impl Default for Config {  fn print_usage(opts: Options) {      let brief = "Usage: dome-key [options]";      print!("{}", opts.usage(&brief)); + +    ::std::process::exit(exitcode::OK);  }  pub fn parse_args<'a>(args: &[String], config: &'a mut Config) -> &'a mut Config { | 
