diff options
| author | Jan Wolff <janw@mailbox.org> | 2020-05-19 07:25:03 +0200 |
|---|---|---|
| committer | Jan Wolff <janw@mailbox.org> | 2020-05-19 07:25:03 +0200 |
| commit | b6e428eba2397ab063f6580098fe100906c44fb1 (patch) | |
| tree | 967a5c6a48bd8f10458250d57a0b5f5d014e78be /src/main.rs | |
| parent | 710e8aae565bd376d493ed89859c52d7f58a34f7 (diff) | |
more documentation
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index b22b626..1a00173 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,12 +6,8 @@ use std::io::{BufRead, BufReader}; use std::path::Path; fn help() { - let version = match option_env!("CARGO_PKG_VERSION") { - Some(v) => v, - None => "", - }; - - println!("usage: sheldond {}", version); + println!("usage:"); + println!(" -h, --help\t\tdisplay this message"); println!(" -c, --config\t\tpath to the configuration file"); } @@ -83,6 +79,11 @@ fn parse_config(fname: String) -> server::ServerConfig { } fn main() { + println!("sheldond {}", match option_env!("CARGO_PKG_VERSION") { + Some(v) => v, + None => "", + }); + let config_fname = match parse_args() { Some(config_fname) => config_fname, None => { |
