diff options
author | ZapAnton <[email protected]> | 2018-07-30 07:14:21 +0100 |
---|---|---|
committer | ZapAnton <[email protected]> | 2018-07-30 07:14:21 +0100 |
commit | 1a776d7c872b99be3e5aa4576e710b85dca84f9e (patch) | |
tree | 89371169edc1cfbd7d629a14118ef15a82123b7c | |
parent | c417c1efe7a93b6e871f2b2c85296a3a3008af54 (diff) |
Getting app name, version, author and description from Cargo.toml
-rw-r--r-- | Cargo.toml | 1 | ||||
-rw-r--r-- | src/main.rs | 8 |
2 files changed, 5 insertions, 4 deletions
@@ -2,6 +2,7 @@ | |||
2 | name = "taizen" | 2 | name = "taizen" |
3 | version = "0.1.0" | 3 | version = "0.1.0" |
4 | authors = ["NerdyPepper <[email protected]>"] | 4 | authors = ["NerdyPepper <[email protected]>"] |
5 | description = "TUI MediaWiki browser" | ||
5 | 6 | ||
6 | [dependencies] | 7 | [dependencies] |
7 | reqwest = { git = "https://github.com/seanmonstar/reqwest" } | 8 | reqwest = { git = "https://github.com/seanmonstar/reqwest" } |
diff --git a/src/main.rs b/src/main.rs index 8b7fdca..fd01af8 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -45,10 +45,10 @@ fn main() { | |||
45 | } | 45 | } |
46 | 46 | ||
47 | fn parse_arguments() -> Configuration { | 47 | fn parse_arguments() -> Configuration { |
48 | let matches = App::new("Taizen") | 48 | let matches = App::new(env!("CARGO_PKG_NAME")) |
49 | .version("0.1.0") | 49 | .version(env!("CARGO_PKG_VERSION")) |
50 | .author("NerdyPepper") | 50 | .author(env!("CARGO_PKG_AUTHORS")) |
51 | .about("TUI MediaWiki browser") | 51 | .about(env!("CARGO_PKG_DESCRIPTION")) |
52 | .arg( | 52 | .arg( |
53 | Arg::with_name("URL") | 53 | Arg::with_name("URL") |
54 | .help("The URL of the wiki to be viewed") | 54 | .help("The URL of the wiki to be viewed") |