From be894becc38296a62760a0724ea1310081e713de Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 15 Jul 2015 09:51:01 +0200 Subject: [PATCH] fix(clap-up): use clap 1.0.3 * `SubCommand::new(...)` was renamed to `SubCommand::with_name(...)` which actually is now consistent with everything else (e.g. `Arg::with_name(...)`) --- etc/api/type-cli.yaml | 2 +- src/mako/cli/lib/argparse.mako | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/api/type-cli.yaml b/etc/api/type-cli.yaml index 50101c09a5..cd0a5fbccf 100644 --- a/etc/api/type-cli.yaml +++ b/etc/api/type-cli.yaml @@ -28,4 +28,4 @@ cargo: dependencies: - strsim = "*" - yup-hyper-mock = ">=1.0.0" - - clap = ">= 0.9.1" + - clap = ">= 1.0.3" diff --git a/src/mako/cli/lib/argparse.mako b/src/mako/cli/lib/argparse.mako index d4f7afc356..3aed9da168 100644 --- a/src/mako/cli/lib/argparse.mako +++ b/src/mako/cli/lib/argparse.mako @@ -256,10 +256,10 @@ let mut app = App::new("${util.program_name()}") % endfor for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); }