From ede447e139a248bd35b472b29ed699e2e04e490f Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 26 Jun 2018 11:18:51 +0200 Subject: [PATCH] Newline after version (#248) --- polkadot/cli/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polkadot/cli/src/lib.rs b/polkadot/cli/src/lib.rs index d70b0cff9c..ba68e7dfce 100644 --- a/polkadot/cli/src/lib.rs +++ b/polkadot/cli/src/lib.rs @@ -126,12 +126,12 @@ pub fn run(args: I) -> error::Result<()> where let core = reactor::Core::new().expect("tokio::Core could not be created"); let yaml = load_yaml!("./cli.yml"); - let matches = match clap::App::from_yaml(yaml).version(crate_version!()).get_matches_from_safe(args) { + let matches = match clap::App::from_yaml(yaml).version(&(crate_version!().to_owned() + "\n")[..]).get_matches_from_safe(args) { Ok(m) => m, Err(ref e) if e.kind == clap::ErrorKind::VersionDisplayed => return Ok(()), - Err(ref e) if e.kind == clap::ErrorKind::HelpDisplayed || e.kind == clap::ErrorKind::VersionDisplayed => { + Err(ref e) if e.kind == clap::ErrorKind::HelpDisplayed => { let _ = clap::App::from_yaml(yaml).print_long_help(); - return Ok(()); + return Ok(()) } Err(e) => return Err(e.into()), };