aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZapAnton <[email protected]>2018-07-30 07:14:21 +0100
committerZapAnton <[email protected]>2018-07-30 07:14:21 +0100
commit1a776d7c872b99be3e5aa4576e710b85dca84f9e (patch)
tree89371169edc1cfbd7d629a14118ef15a82123b7c
parentc417c1efe7a93b6e871f2b2c85296a3a3008af54 (diff)
Getting app name, version, author and description from Cargo.toml
-rw-r--r--Cargo.toml1
-rw-r--r--src/main.rs8
2 files changed, 5 insertions, 4 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 2adeae2..c397436 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,6 +2,7 @@
2name = "taizen" 2name = "taizen"
3version = "0.1.0" 3version = "0.1.0"
4authors = ["NerdyPepper <[email protected]>"] 4authors = ["NerdyPepper <[email protected]>"]
5description = "TUI MediaWiki browser"
5 6
6[dependencies] 7[dependencies]
7reqwest = { git = "https://github.com/seanmonstar/reqwest" } 8reqwest = { 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
47fn parse_arguments() -> Configuration { 47fn 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")