From 49aa103bfd82def67a8f01cc676497d92a3403ec Mon Sep 17 00:00:00 2001 From: "Hatter Jiang@Pixelbook" Date: Sat, 31 Aug 2019 15:09:22 +0800 Subject: [PATCH] update name --- src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index ba5dd29..ba66bd6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,16 +16,17 @@ use rust_util::{ }; use opt::*; +const NAME: &str = env!("CARGO_PKG_NAME"); const VERSION: &str = env!("CARGO_PKG_VERSION"); const GIT_HASH: &str = env!("GIT_HASH"); fn print_version() { - print!(r#"prettyjson {} - {} + print!(r#"{} {} - {} Copyright (C) 2019 Hatter Jiang. License MIT Written by Hatter Jiang -"#, VERSION, &GIT_HASH[0..7]); +"#, NAME, VERSION, &GIT_HASH[0..7]); } @@ -34,7 +35,7 @@ fn main() { options.parse_args(); if options.verbose { - print_message(MessageType::DEBUG, &format!("prettyjson version: {}, git hash: {}", VERSION, GIT_HASH)); + print_message(MessageType::DEBUG, &format!("{} version: {}, git hash: {}", NAME, VERSION, GIT_HASH)); } if options.version {