Move version! from core:: to clap_utils:: (#6944)

* Move version! from core to clap-utils

* Completely move version! from core:: to clap_utils::

* rustfmt

* Do remaining transition after rebase
This commit is contained in:
Ryo Onodera
2019-11-14 13:10:38 +09:00
committed by GitHub
parent cc96848b01
commit 4fc767b3f6
36 changed files with 146 additions and 126 deletions

View File

@ -1,4 +1,4 @@
use clap::{crate_description, crate_name, crate_version, App, Arg, ArgMatches};
use clap::{crate_description, crate_name, App, Arg, ArgMatches};
use solana_drone::drone::DRONE_PORT;
use solana_sdk::fee_calculator::FeeCalculator;
use solana_sdk::signature::{read_keypair_file, Keypair, KeypairUtil};
@ -50,9 +50,9 @@ impl Default for Config {
}
/// Defines and builds the CLI args for a run of the benchmark
pub fn build_args<'a, 'b>() -> App<'a, 'b> {
pub fn build_args<'a, 'b>(version: &'b str) -> App<'a, 'b> {
App::new(crate_name!()).about(crate_description!())
.version(crate_version!())
.version(version)
.arg(
Arg::with_name("entrypoint")
.short("n")

View File

@ -15,7 +15,7 @@ fn main() {
solana_logger::setup_with_filter("solana=info");
solana_metrics::set_panic_hook("bench-tps");
let matches = cli::build_args().get_matches();
let matches = cli::build_args(solana_clap_utils::version!()).get_matches();
let cli_config = cli::extract_args(&matches);
let cli::Config {