From a09b5281db9b31f813530a9d1373197af093a619 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 20 Feb 2016 21:15:09 +0100 Subject: [PATCH 1/2] libimagrt: Update clap --- libimagrt/Cargo.toml | 2 +- libimagrt/src/runtime.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libimagrt/Cargo.toml b/libimagrt/Cargo.toml index 8302dfbd..276295fb 100644 --- a/libimagrt/Cargo.toml +++ b/libimagrt/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Matthias Beyer "] [dependencies] -clap = "1.5.5" +clap = "2.1.1" config = "0.1.3" log = "0.3.4" xdg-basedir = "0.2.2" diff --git a/libimagrt/src/runtime.rs b/libimagrt/src/runtime.rs index 7a679360..6827341c 100644 --- a/libimagrt/src/runtime.rs +++ b/libimagrt/src/runtime.rs @@ -16,7 +16,7 @@ use libimagstore::store::Store; pub struct Runtime<'a> { rtp: PathBuf, configuration: Configuration, - cli_matches: ArgMatches<'a, 'a>, + cli_matches: ArgMatches<'a>, store: Store, } @@ -30,7 +30,7 @@ impl<'a> Runtime<'a> { * The cli_spec object should be initially build with the ::get_default_cli_builder() function. * */ - pub fn new(cli_spec: App<'a, 'a, 'a, 'a, 'a, 'a>) -> Result, RuntimeError> { + pub fn new(cli_spec: App<'a, 'a>) -> Result, RuntimeError> { use std::env; let matches = cli_spec.get_matches(); @@ -80,7 +80,7 @@ impl<'a> Runtime<'a> { pub fn get_default_cli_builder(appname: &'a str, version: &'a str, about: &'a str) - -> App<'a, 'a, 'a, 'a, 'a, 'a> + -> App<'a, 'a> { App::new(appname) .version(version) From da74e4976eb06e9928f17a2283ff95696608fc33 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 20 Feb 2016 21:21:51 +0100 Subject: [PATCH 2/2] imag-store: Update clap: 1.5.5 -> 2.1.1 --- imag-store/Cargo.toml | 2 +- imag-store/src/ui.rs | 2 +- imag-store/src/util.rs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/imag-store/Cargo.toml b/imag-store/Cargo.toml index 07d531b4..cadd37d0 100644 --- a/imag-store/Cargo.toml +++ b/imag-store/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Matthias Beyer "] [dependencies] -clap = "1.5.5" +clap = "2.1.1" log = "0.3.5" version = "2.0.1" semver = "0.2.1" diff --git a/imag-store/src/ui.rs b/imag-store/src/ui.rs index da8886f7..59dfbcaf 100644 --- a/imag-store/src/ui.rs +++ b/imag-store/src/ui.rs @@ -1,6 +1,6 @@ use clap::{Arg, App, SubCommand}; -pub fn build_ui<'a>(app: App<'a, 'a, 'a, 'a, 'a, 'a>) -> App<'a, 'a, 'a, 'a, 'a, 'a> { +pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> { app.subcommand(SubCommand::with_name("create") .about("Create an entry from the store") .version("0.1") diff --git a/imag-store/src/util.rs b/imag-store/src/util.rs index 987ab4f3..9fb01720 100644 --- a/imag-store/src/util.rs +++ b/imag-store/src/util.rs @@ -44,7 +44,6 @@ pub fn build_toml_header(matches: &ArgMatches, mut header: EntryHeader) -> Entry debug!("Building header from cli spec"); if let Some(headerspecs) = matches.values_of("header") { let mut main = header.into(); - debug!("headerspec = {:?}", headerspecs); let kvs = headerspecs.into_iter() .filter_map(|hs| { debug!("- Processing: '{}'", hs);