diff options
| author | Reiner Herrmann <reiner@reiner-h.de> | 2019-03-08 20:59:04 +0100 |
|---|---|---|
| committer | Reiner Herrmann <reiner@reiner-h.de> | 2019-03-08 20:59:04 +0100 |
| commit | 048c513204ec3ee2f85c6667590ae644b46f92e0 (patch) | |
| tree | 8980de6e908fd630d58383085647675c2bfb66a6 /src/tftpc.rs | |
| parent | 7202a395f9397ef22e137037a31d85668ceb1be7 (diff) | |
Display version number in usage text
Diffstat (limited to 'src/tftpc.rs')
| -rw-r--r-- | src/tftpc.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tftpc.rs b/src/tftpc.rs index 689d055..adac705 100644 --- a/src/tftpc.rs +++ b/src/tftpc.rs @@ -249,7 +249,8 @@ fn usage(opts: Options, program: String, error: Option<String>) { if let Some(err) = error { println!("{}\n", err); } - println!("{}", opts.usage(format!("RusTFTP\n\n{} [options] <remote>[:port]", program).as_str())); + let version = rtftp::VERSION.unwrap_or(""); + println!("{}", opts.usage(format!("RusTFTP {}\n\n{} [options] <remote>[:port]", version, program).as_str())); } fn parse_commandline(args: &[String]) -> Result<Configuration, &str> { |
