From 9a3bc98e9b55e7514b74b73374c5ac8b6e5e0508 Mon Sep 17 00:00:00 2001 From: Kevin K Date: Sun, 12 Mar 2017 12:43:10 -0400 Subject: [PATCH 1/5] fix(Positionals): fixes some regression bugs resulting from old asserts in debug mode. Closes #896 --- src/app/parser.rs | 51 ++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/src/app/parser.rs b/src/app/parser.rs index 751ec189..f8be34a4 100644 --- a/src/app/parser.rs +++ b/src/app/parser.rs @@ -455,31 +455,30 @@ impl<'a, 'b> Parser<'a, 'b> // Or the second to last has a terminator or .last(true) set let ok = last.is_set(ArgSettings::Required) || (second_to_last.v.terminator.is_some() || - second_to_last.b.is_set(ArgSettings::Last)); + second_to_last.b.is_set(ArgSettings::Last)) || + last.is_set(ArgSettings::Last); assert!(ok, "When using a positional argument with .multiple(true) that is *not the \ last* positional argument, the last positional argument (i.e the one \ with the highest index) *must* have .required(true) or .last(true) set."); - let num = self.positionals.len() - 1; - let ok = self.positionals - .get(num) - .unwrap() - .is_set(ArgSettings::Multiple); + let ok = second_to_last.is_set(ArgSettings::Multiple) || last.is_set(ArgSettings::Last); assert!(ok, "Only the last positional argument, or second to last positional \ argument may be set to .multiple(true)"); - self.settings.set(AS::LowIndexMultiplePositional); + let count = self.positionals + .values() + .filter(|p| p.b.settings.is_set(ArgSettings::Multiple) && p.v.num_vals.is_none()) + .count(); + let ok = count <= 1 || + (last.is_set(ArgSettings::Last) && last.is_set(ArgSettings::Multiple) && + second_to_last.is_set(ArgSettings::Multiple) && + count == 2); + assert!(ok, + "Only one positional argument with .multiple(true) set is allowed per \ + command, unless the second one also has .last(true) set"); } - let ok = self.positionals - .values() - .filter(|p| p.b.settings.is_set(ArgSettings::Multiple) && p.v.num_vals.is_none()) - .map(|_| 1) - .sum::() <= 1; - assert!(ok, - "Only one positional argument with .multiple(true) set is allowed per \ - command"); if self.is_set(AS::AllowMissingPositional) { // Check that if a required positional argument is found, all positions with a lower @@ -677,7 +676,6 @@ impl<'a, 'b> Parser<'a, 'b> // allow wrong self convention due to self.valid_neg_num = true and it's a private method #[cfg_attr(feature = "lints", allow(wrong_self_convention))] - #[inline] fn is_new_arg(&mut self, arg_os: &OsStr, needs_val_of: Option<&'a str>) -> bool { debugln!("Parser::is_new_arg: arg={:?}, Needs Val of={:?}", arg_os, @@ -743,6 +741,13 @@ impl<'a, 'b> Parser<'a, 'b> debugln!("Parser::get_matches_with;"); // Verify all positional assertions pass debug_assert!(self.verify_positionals()); + if self.positionals.values().any(|a| { + a.b.is_set(ArgSettings::Multiple) && + (a.index as usize != self.positionals.len()) + }) && + self.positionals.values().last().map_or(false, |p| !p.is_set(ArgSettings::Last)) { + self.settings.set(AS::LowIndexMultiplePositional); + } let has_args = self.has_args(); // Next we create the `--help` and `--version` arguments and add them if @@ -761,6 +766,11 @@ impl<'a, 'b> Parser<'a, 'b> self.unset(AS::ValidNegNumFound); // Is this a new argument, or values from a previous option? let starts_new_arg = self.is_new_arg(&arg_os, needs_val_of); + if arg_os.starts_with(b"--") && arg_os.len_() == 2 { + debugln!("Parser::get_matches_with: setting TrailingVals=true"); + self.set(AS::TrailingValues); + continue; + } // Has the user already passed '--'? Meaning only positional args follow if !self.is_set(AS::TrailingValues) { @@ -792,15 +802,6 @@ impl<'a, 'b> Parser<'a, 'b> } } else { if arg_os.starts_with(b"--") { - if arg_os.len_() == 2 { - // The user has passed '--' which means only positional args follow no - // matter what they start with - debugln!("Parser::get_matches_with: found '--'"); - debugln!("Parser::get_matches_with: setting TrailingVals=true"); - self.set(AS::TrailingValues); - continue; - } - needs_val_of = try!(self.parse_long_arg(matcher, &arg_os)); if !(needs_val_of.is_none() && self.is_set(AS::AllowLeadingHyphen)) { continue; From b049cecccc11693147bd0b2906df00b7eb5852de Mon Sep 17 00:00:00 2001 From: Kevin K Date: Sun, 12 Mar 2017 12:45:59 -0400 Subject: [PATCH 2/5] tests: adds tests for passing assertions with new Arg::last setting --- tests/positionals.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/positionals.rs b/tests/positionals.rs index cf7cf468..3a4ecac9 100644 --- a/tests/positionals.rs +++ b/tests/positionals.rs @@ -233,4 +233,14 @@ fn last_positional_no_double_dash() { .get_matches_from_safe(vec!["test", "tgt", "crp", "arg"]); assert!(r.is_err()); assert_eq!(r.unwrap_err().kind, ErrorKind::UnknownArgument); +} + +#[test] +fn last_positional_second_to_last_mult() { + let r = App::new("test") + .arg_from_usage(" 'some target'") + .arg_from_usage("[CORPUS]... 'some corpus'") + .arg(Arg::from_usage("[ARGS]... 'some file'").last(true)) + .get_matches_from_safe(vec!["test", "tgt", "crp1", "crp2", "--", "arg"]); + assert!(r.is_ok(), "{:?}", r.unwrap_err().kind); } \ No newline at end of file From 74b751ff2e3631e337b7946347c1119829a41c53 Mon Sep 17 00:00:00 2001 From: Kevin K Date: Sun, 12 Mar 2017 12:52:09 -0400 Subject: [PATCH 3/5] fix(ArgRequiredElseHelp): fixes the precedence of this error to prioritize over other error messages Closes #895 --- src/app/validator.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/validator.rs b/src/app/validator.rs index f874a8dc..ad4aa3db 100644 --- a/src/app/validator.rs +++ b/src/app/validator.rs @@ -49,13 +49,6 @@ impl<'a, 'b, 'z> Validator<'a, 'b, 'z> { } } - try!(self.validate_blacklist(matcher)); - if !(self.0.is_set(AS::SubcommandsNegateReqs) && subcmd_name.is_some()) && !reqs_validated { - try!(self.validate_required(matcher)); - } - try!(self.validate_matched_args(matcher)); - matcher.usage(usage::create_usage_with_title(self.0, &[])); - if matcher.is_empty() && matcher.subcommand_name().is_none() && self.0.is_set(AS::ArgRequiredElseHelp) { let mut out = vec![]; @@ -66,6 +59,13 @@ impl<'a, 'b, 'z> Validator<'a, 'b, 'z> { info: None, }); } + try!(self.validate_blacklist(matcher)); + if !(self.0.is_set(AS::SubcommandsNegateReqs) && subcmd_name.is_some()) && !reqs_validated { + try!(self.validate_required(matcher)); + } + try!(self.validate_matched_args(matcher)); + matcher.usage(usage::create_usage_with_title(self.0, &[])); + Ok(()) } From ef037eaf22a6c44abb8cee0df383f8019995ee73 Mon Sep 17 00:00:00 2001 From: Kevin K Date: Sun, 12 Mar 2017 12:53:40 -0400 Subject: [PATCH 4/5] tests: adds tests to check precedence of ArgRequiredElseHelp --- tests/app_settings.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/app_settings.rs b/tests/app_settings.rs index 644a863b..7f6b3f00 100644 --- a/tests/app_settings.rs +++ b/tests/app_settings.rs @@ -110,6 +110,18 @@ fn arg_required_else_help() { assert_eq!(err.kind, ErrorKind::MissingArgumentOrSubcommand); } +#[test] +fn arg_required_else_help_over_reqs() { + let result = App::new("arg_required") + .setting(AppSettings::ArgRequiredElseHelp) + .arg(Arg::with_name("test") + .index(1).required(true)) + .get_matches_from_safe(vec![""]); + assert!(result.is_err()); + let err = result.err().unwrap(); + assert_eq!(err.kind, ErrorKind::MissingArgumentOrSubcommand); +} + #[cfg(not(feature = "suggestions"))] #[test] fn infer_subcommands_fail_no_args() { From e7c2eafb26c2416d20f165c7ffecaf57d8fb59a4 Mon Sep 17 00:00:00 2001 From: Kevin K Date: Sun, 12 Mar 2017 12:56:23 -0400 Subject: [PATCH 5/5] chore: increase version --- CHANGELOG.md | 11 ++++++++++ CONTRIBUTORS.md | 58 ++++++++++++++++++++++++++++--------------------- Cargo.toml | 2 +- README.md | 5 +++++ 4 files changed, 50 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01db9df7..81490bab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ + +### v2.21.1 (2017-03-12) + + +#### Bug Fixes + +* **ArgRequiredElseHelp:** fixes the precedence of this error to prioritize over other error messages ([74b751ff](https://github.com/kbknapp/clap-rs/commit/74b751ff2e3631e337b7946347c1119829a41c53), closes [#895](https://github.com/kbknapp/clap-rs/issues/895)) +* **Positionals:** fixes some regression bugs resulting from old asserts in debug mode. ([9a3bc98e](https://github.com/kbknapp/clap-rs/commit/9a3bc98e9b55e7514b74b73374c5ac8b6e5e0508), closes [#896](https://github.com/kbknapp/clap-rs/issues/896)) + + + ## v2.21.0 (2017-03-09) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 56365f0d..366810ee 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,56 +1,64 @@ The following is a list of contributors in alphabetical order: -[afiune](https://github.com/afiune) |[alex-gulyas](https://github.com/alex-gulyas) |[alexbool](https://github.com/alexbool) |[AluisioASG](https://github.com/AluisioASG) |[archer884](https://github.com/archer884) |[Arnavion](https://github.com/Arnavion) | +[afiune](https://github.com/afiune) |[alex-gulyas](https://github.com/alex-gulyas) |[alexbool](https://github.com/alexbool) |[AluisioASG](https://github.com/AluisioASG) |[andete](https://github.com/andete) |[archer884](https://github.com/archer884) | :---: |:---: |:---: |:---: |:---: |:---: | -[afiune](https://github.com/afiune) |[alex-gulyas](https://github.com/alex-gulyas) |[alexbool](https://github.com/alexbool) |[AluisioASG](https://github.com/AluisioASG) |[archer884](https://github.com/archer884) |[Arnavion](https://github.com/Arnavion) | +[afiune](https://github.com/afiune) |[alex-gulyas](https://github.com/alex-gulyas) |[alexbool](https://github.com/alexbool) |[AluisioASG](https://github.com/AluisioASG) |[andete](https://github.com/andete) |[archer884](https://github.com/archer884) | -[Bilalh](https://github.com/Bilalh) |[birkenfeld](https://github.com/birkenfeld) |[bradurani](https://github.com/bradurani) |[brennie](https://github.com/brennie) |[brianp](https://github.com/brianp) |[BurntSushi](https://github.com/BurntSushi) | +[Arnavion](https://github.com/Arnavion) |[Bilalh](https://github.com/Bilalh) |[birkenfeld](https://github.com/birkenfeld) |[bradurani](https://github.com/bradurani) |[brennie](https://github.com/brennie) |[brianp](https://github.com/brianp) | :---: |:---: |:---: |:---: |:---: |:---: | -[Bilalh](https://github.com/Bilalh) |[birkenfeld](https://github.com/birkenfeld) |[bradurani](https://github.com/bradurani) |[brennie](https://github.com/brennie) |[brianp](https://github.com/brianp) |[BurntSushi](https://github.com/BurntSushi) | +[Arnavion](https://github.com/Arnavion) |[Bilalh](https://github.com/Bilalh) |[birkenfeld](https://github.com/birkenfeld) |[bradurani](https://github.com/bradurani) |[brennie](https://github.com/brennie) |[brianp](https://github.com/brianp) | -[Byron](https://github.com/Byron) |[casey](https://github.com/casey) |[cite-reader](https://github.com/cite-reader) |[cstorey](https://github.com/cstorey) |[daboross](https://github.com/daboross) |[davidszotten](https://github.com/davidszotten) | +[BurntSushi](https://github.com/BurntSushi) |[Byron](https://github.com/Byron) |[casey](https://github.com/casey) |[cite-reader](https://github.com/cite-reader) |[crazymerlyn](https://github.com/crazymerlyn) |[cstorey](https://github.com/cstorey) | :---: |:---: |:---: |:---: |:---: |:---: | -[Byron](https://github.com/Byron) |[casey](https://github.com/casey) |[cite-reader](https://github.com/cite-reader) |[cstorey](https://github.com/cstorey) |[daboross](https://github.com/daboross) |[davidszotten](https://github.com/davidszotten) | +[BurntSushi](https://github.com/BurntSushi) |[Byron](https://github.com/Byron) |[casey](https://github.com/casey) |[cite-reader](https://github.com/cite-reader) |[crazymerlyn](https://github.com/crazymerlyn) |[cstorey](https://github.com/cstorey) | -[Deedasmi](https://github.com/Deedasmi) |[dguo](https://github.com/dguo) |[dotdash](https://github.com/dotdash) |[flying-sheep](https://github.com/flying-sheep) |[Geogi](https://github.com/Geogi) |[glowing-chemist](https://github.com/glowing-chemist) | +[daboross](https://github.com/daboross) |[davidszotten](https://github.com/davidszotten) |[Deedasmi](https://github.com/Deedasmi) |[dguo](https://github.com/dguo) |[dotdash](https://github.com/dotdash) |[eddyb](https://github.com/eddyb) | :---: |:---: |:---: |:---: |:---: |:---: | -[Deedasmi](https://github.com/Deedasmi) |[dguo](https://github.com/dguo) |[dotdash](https://github.com/dotdash) |[flying-sheep](https://github.com/flying-sheep) |[Geogi](https://github.com/Geogi) |[glowing-chemist](https://github.com/glowing-chemist) | +[daboross](https://github.com/daboross) |[davidszotten](https://github.com/davidszotten) |[Deedasmi](https://github.com/Deedasmi) |[dguo](https://github.com/dguo) |[dotdash](https://github.com/dotdash) |[eddyb](https://github.com/eddyb) | -[gohyda](https://github.com/gohyda) |[GrappigPanda](https://github.com/GrappigPanda) |[grossws](https://github.com/grossws) |[hexjelly](https://github.com/hexjelly) |[hgrecco](https://github.com/hgrecco) |[homu](https://github.com/homu) | +[flying-sheep](https://github.com/flying-sheep) |[frewsxcv](https://github.com/frewsxcv) |[Geogi](https://github.com/Geogi) |[glowing-chemist](https://github.com/glowing-chemist) |[gohyda](https://github.com/gohyda) |[GrappigPanda](https://github.com/GrappigPanda) | :---: |:---: |:---: |:---: |:---: |:---: | -[gohyda](https://github.com/gohyda) |[GrappigPanda](https://github.com/GrappigPanda) |[grossws](https://github.com/grossws) |[hexjelly](https://github.com/hexjelly) |[hgrecco](https://github.com/hgrecco) |[homu](https://github.com/homu) | +[flying-sheep](https://github.com/flying-sheep) |[frewsxcv](https://github.com/frewsxcv) |[Geogi](https://github.com/Geogi) |[glowing-chemist](https://github.com/glowing-chemist) |[gohyda](https://github.com/gohyda) |[GrappigPanda](https://github.com/GrappigPanda) | -[hoodie](https://github.com/hoodie) |[huonw](https://github.com/huonw) |[idmit](https://github.com/idmit) |[iliekturtles](https://github.com/iliekturtles) |[james-darkfox](https://github.com/james-darkfox) |[japaric](https://github.com/japaric) | +[grossws](https://github.com/grossws) |[hexjelly](https://github.com/hexjelly) |[hgrecco](https://github.com/hgrecco) |[homu](https://github.com/homu) |[hoodie](https://github.com/hoodie) |[huonw](https://github.com/huonw) | :---: |:---: |:---: |:---: |:---: |:---: | -[hoodie](https://github.com/hoodie) |[huonw](https://github.com/huonw) |[idmit](https://github.com/idmit) |[iliekturtles](https://github.com/iliekturtles) |[james-darkfox](https://github.com/james-darkfox) |[japaric](https://github.com/japaric) | +[grossws](https://github.com/grossws) |[hexjelly](https://github.com/hexjelly) |[hgrecco](https://github.com/hgrecco) |[homu](https://github.com/homu) |[hoodie](https://github.com/hoodie) |[huonw](https://github.com/huonw) | -[jespino](https://github.com/jespino) |[jimmycuadra](https://github.com/jimmycuadra) |[joshtriplett](https://github.com/joshtriplett) |[jtdowney](https://github.com/jtdowney) |[kbknapp](https://github.com/kbknapp) |[Keats](https://github.com/Keats) | +[idmit](https://github.com/idmit) |[ignatenkobrain](https://github.com/ignatenkobrain) |[iliekturtles](https://github.com/iliekturtles) |[james-darkfox](https://github.com/james-darkfox) |[japaric](https://github.com/japaric) |[jespino](https://github.com/jespino) | :---: |:---: |:---: |:---: |:---: |:---: | -[jespino](https://github.com/jespino) |[jimmycuadra](https://github.com/jimmycuadra) |[joshtriplett](https://github.com/joshtriplett) |[jtdowney](https://github.com/jtdowney) |[kbknapp](https://github.com/kbknapp) |[Keats](https://github.com/Keats) | +[idmit](https://github.com/idmit) |[ignatenkobrain](https://github.com/ignatenkobrain) |[iliekturtles](https://github.com/iliekturtles) |[james-darkfox](https://github.com/james-darkfox) |[japaric](https://github.com/japaric) |[jespino](https://github.com/jespino) | -[matthiasbeyer](https://github.com/matthiasbeyer) |[mernen](https://github.com/mernen) |[messense](https://github.com/messense) |[mgeisler](https://github.com/mgeisler) |[mineo](https://github.com/mineo) |[musoke](https://github.com/musoke) | +[jimmycuadra](https://github.com/jimmycuadra) |[joshtriplett](https://github.com/joshtriplett) |[jtdowney](https://github.com/jtdowney) |[kbknapp](https://github.com/kbknapp) |[Keats](https://github.com/Keats) |[malbarbo](https://github.com/malbarbo) | +:---: |:---: |:---: |:---: |:---: |:---: | +[jimmycuadra](https://github.com/jimmycuadra) |[joshtriplett](https://github.com/joshtriplett) |[jtdowney](https://github.com/jtdowney) |[kbknapp](https://github.com/kbknapp) |[Keats](https://github.com/Keats) |[malbarbo](https://github.com/malbarbo) | + +[matthiasbeyer](https://github.com/matthiasbeyer) |[mernen](https://github.com/mernen) |[messense](https://github.com/messense) |[mgeisler](https://github.com/mgeisler) |[mineo](https://github.com/mineo) |[musoke](https://github.com/musoke) | :---: |:---: |:---: |:---: |:---: |:---: | [matthiasbeyer](https://github.com/matthiasbeyer) |[mernen](https://github.com/mernen) |[messense](https://github.com/messense) |[mgeisler](https://github.com/mgeisler) |[mineo](https://github.com/mineo) |[musoke](https://github.com/musoke) | -[mvaude](https://github.com/mvaude) |[N-006](https://github.com/N-006) |[nabijaczleweli](https://github.com/nabijaczleweli) |[nelsonjchen](https://github.com/nelsonjchen) |[Nemo157](https://github.com/Nemo157) |[nicompte](https://github.com/nicompte) | +[mvaude](https://github.com/mvaude) |[N-006](https://github.com/N-006) |[nabijaczleweli](https://github.com/nabijaczleweli) |[nelsonjchen](https://github.com/nelsonjchen) |[Nemo157](https://github.com/Nemo157) |[NickeZ](https://github.com/NickeZ) | :---: |:---: |:---: |:---: |:---: |:---: | -[mvaude](https://github.com/mvaude) |[N-006](https://github.com/N-006) |[nabijaczleweli](https://github.com/nabijaczleweli) |[nelsonjchen](https://github.com/nelsonjchen) |[Nemo157](https://github.com/Nemo157) |[nicompte](https://github.com/nicompte) | +[mvaude](https://github.com/mvaude) |[N-006](https://github.com/N-006) |[nabijaczleweli](https://github.com/nabijaczleweli) |[nelsonjchen](https://github.com/nelsonjchen) |[Nemo157](https://github.com/Nemo157) |[NickeZ](https://github.com/NickeZ) | -[nvzqz](https://github.com/nvzqz) |[ogham](https://github.com/ogham) |[panicbit](https://github.com/panicbit) |[pixelistik](https://github.com/pixelistik) |[rnelson](https://github.com/rnelson) |[rtaycher](https://github.com/rtaycher) | +[nicompte](https://github.com/nicompte) |[nox](https://github.com/nox) |[nvzqz](https://github.com/nvzqz) |[ogham](https://github.com/ogham) |[panicbit](https://github.com/panicbit) |[pixelistik](https://github.com/pixelistik) | :---: |:---: |:---: |:---: |:---: |:---: | -[nvzqz](https://github.com/nvzqz) |[ogham](https://github.com/ogham) |[panicbit](https://github.com/panicbit) |[pixelistik](https://github.com/pixelistik) |[rnelson](https://github.com/rnelson) |[rtaycher](https://github.com/rtaycher) | +[nicompte](https://github.com/nicompte) |[nox](https://github.com/nox) |[nvzqz](https://github.com/nvzqz) |[ogham](https://github.com/ogham) |[panicbit](https://github.com/panicbit) |[pixelistik](https://github.com/pixelistik) | -[Seeker14491](https://github.com/Seeker14491) |[shepmaster](https://github.com/shepmaster) |[SirVer](https://github.com/SirVer) |[sru](https://github.com/sru) |[SShrike](https://github.com/SShrike) |[starkat99](https://github.com/starkat99) | +[pkgw](https://github.com/pkgw) |[porglezomp](https://github.com/porglezomp) |[rnelson](https://github.com/rnelson) |[rtaycher](https://github.com/rtaycher) |[Seeker14491](https://github.com/Seeker14491) |[shepmaster](https://github.com/shepmaster) | :---: |:---: |:---: |:---: |:---: |:---: | -[Seeker14491](https://github.com/Seeker14491) |[shepmaster](https://github.com/shepmaster) |[SirVer](https://github.com/SirVer) |[sru](https://github.com/sru) |[SShrike](https://github.com/SShrike) |[starkat99](https://github.com/starkat99) | +[pkgw](https://github.com/pkgw) |[porglezomp](https://github.com/porglezomp) |[rnelson](https://github.com/rnelson) |[rtaycher](https://github.com/rtaycher) |[Seeker14491](https://github.com/Seeker14491) |[shepmaster](https://github.com/shepmaster) | -[SuperFluffy](https://github.com/SuperFluffy) |[swatteau](https://github.com/swatteau) |[tanakh](https://github.com/tanakh) |[th4t](https://github.com/th4t) |[tormol](https://github.com/tormol) |[tshepang](https://github.com/tshepang) | +[SirVer](https://github.com/SirVer) |[sru](https://github.com/sru) |[SShrike](https://github.com/SShrike) |[starkat99](https://github.com/starkat99) |[SuperFluffy](https://github.com/SuperFluffy) |[swatteau](https://github.com/swatteau) | :---: |:---: |:---: |:---: |:---: |:---: | -[SuperFluffy](https://github.com/SuperFluffy) |[swatteau](https://github.com/swatteau) |[tanakh](https://github.com/tanakh) |[th4t](https://github.com/th4t) |[tormol](https://github.com/tormol) |[tshepang](https://github.com/tshepang) | +[SirVer](https://github.com/SirVer) |[sru](https://github.com/sru) |[SShrike](https://github.com/SShrike) |[starkat99](https://github.com/starkat99) |[SuperFluffy](https://github.com/SuperFluffy) |[swatteau](https://github.com/swatteau) | -[tspiteri](https://github.com/tspiteri) |[untitaker](https://github.com/untitaker) |[Vinatorul](https://github.com/Vinatorul) |[vks](https://github.com/vks) |[volks73](https://github.com/volks73) |[wdv4758h](https://github.com/wdv4758h) | +[tanakh](https://github.com/tanakh) |[th4t](https://github.com/th4t) |[tormol](https://github.com/tormol) |[tshepang](https://github.com/tshepang) |[tspiteri](https://github.com/tspiteri) |[untitaker](https://github.com/untitaker) | :---: |:---: |:---: |:---: |:---: |:---: | -[tspiteri](https://github.com/tspiteri) |[untitaker](https://github.com/untitaker) |[Vinatorul](https://github.com/Vinatorul) |[vks](https://github.com/vks) |[volks73](https://github.com/volks73) |[wdv4758h](https://github.com/wdv4758h) | +[tanakh](https://github.com/tanakh) |[th4t](https://github.com/th4t) |[tormol](https://github.com/tormol) |[tshepang](https://github.com/tshepang) |[tspiteri](https://github.com/tspiteri) |[untitaker](https://github.com/untitaker) | + +[Vinatorul](https://github.com/Vinatorul) |[vks](https://github.com/vks) |[volks73](https://github.com/volks73) |[wdv4758h](https://github.com/wdv4758h) | +:---: |:---: |:---: |:---: | +[Vinatorul](https://github.com/Vinatorul) |[vks](https://github.com/vks) |[volks73](https://github.com/volks73) |[wdv4758h](https://github.com/wdv4758h) | diff --git a/Cargo.toml b/Cargo.toml index d196268b..c5a226d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "clap" -version = "2.21.0" +version = "2.21.1" authors = ["Kevin K. "] exclude = ["examples/*", "clap-test/*", "tests/*", "benches/*", "*.png", "clap-perf/*", "*.dot"] repository = "https://github.com/kbknapp/clap-rs.git" diff --git a/README.md b/README.md index 6d21ae61..d7d17725 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,11 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc) ## What's New +Here's the highlights for v2.21.1 + +* fixes the precedence of this error to prioritize over other error messages +* fixes some regression bugs resulting from old asserts in debug mode. + Here's the highlights for v2.21.0 * adds the ability to mark a positional argument as 'last' which means it should be used with `--` syntax and can be accessed early to effectivly skip other positional args