Merge pull request #207 from matthiasbeyer/update-clap

Update clap
This commit is contained in:
Matthias Beyer 2016-02-23 10:13:52 +01:00
commit 43859aa6d3
5 changed files with 6 additions and 7 deletions

View file

@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Matthias Beyer <mail@beyermatthias.de>"]
[dependencies]
clap = "1.5.5"
clap = "2.1.1"
log = "0.3.5"
version = "2.0.1"
semver = "0.2.1"

View file

@ -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")

View file

@ -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);

View file

@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Matthias Beyer <mail@beyermatthias.de>"]
[dependencies]
clap = "1.5.5"
clap = "2.1.1"
config = "0.1.3"
log = "0.3.4"
xdg-basedir = "0.2.2"

View file

@ -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<Runtime<'a>, RuntimeError> {
pub fn new(cli_spec: App<'a, 'a>) -> Result<Runtime<'a>, 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)