From 1a776d7c872b99be3e5aa4576e710b85dca84f9e Mon Sep 17 00:00:00 2001 From: ZapAnton Date: Mon, 30 Jul 2018 09:14:21 +0300 Subject: Getting app name, version, author and description from Cargo.toml --- Cargo.toml | 1 + src/main.rs | 8 ++++---- 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 @@ name = "taizen" version = "0.1.0" authors = ["NerdyPepper "] +description = "TUI MediaWiki browser" [dependencies] 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() { } fn parse_arguments() -> Configuration { - let matches = App::new("Taizen") - .version("0.1.0") - .author("NerdyPepper") - .about("TUI MediaWiki browser") + let matches = App::new(env!("CARGO_PKG_NAME")) + .version(env!("CARGO_PKG_VERSION")) + .author(env!("CARGO_PKG_AUTHORS")) + .about(env!("CARGO_PKG_DESCRIPTION")) .arg( Arg::with_name("URL") .help("The URL of the wiki to be viewed") -- cgit v1.2.3