From c978c22161c7abfa52bbba5bf22d5ea187403c29 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 28 Jul 2019 11:12:56 +0800 Subject: [PATCH] use package version --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d21ca0b..6187d65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -136,7 +136,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "prettyjson" -version = "0.1.0" +version = "0.1.1" dependencies = [ "argparse 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "json 0.11.14 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 0a00cf9..504cb7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "prettyjson" -version = "0.1.0" +version = "0.1.1" authors = ["Hatter Jiang "] edition = "2018" diff --git a/src/main.rs b/src/main.rs index 78eced1..fb34b1f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ use std::{ use argparse::{ArgumentParser, StoreTrue, Store}; use rust_util::*; -const VERSION: &str = "0.1"; +const VERSION: &'static str = env!("CARGO_PKG_VERSION"); fn print_version() { print!(r#"prettyjson {}