From b6e428eba2397ab063f6580098fe100906c44fb1 Mon Sep 17 00:00:00 2001 From: Jan Wolff Date: Tue, 19 May 2020 07:25:03 +0200 Subject: more documentation --- src/main.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/main.rs') 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 => { -- cgit v1.2.3