From ef24de24a82fe681581cc130f342363c47c0969a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:48 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/clap_builder/src/parser/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vendor/clap_builder/src/parser') diff --git a/vendor/clap_builder/src/parser/parser.rs b/vendor/clap_builder/src/parser/parser.rs index fcde4a86e..4b24eb0de 100644 --- a/vendor/clap_builder/src/parser/parser.rs +++ b/vendor/clap_builder/src/parser/parser.rs @@ -643,7 +643,7 @@ impl<'cmd> Parser<'cmd> { if self.cmd[current_positional.get_id()].is_allow_hyphen_values_set() || (self.cmd[current_positional.get_id()].is_allow_negative_numbers_set() - && next.is_number()) + && next.is_negative_number()) { // If allow hyphen, this isn't a new arg. debug!("Parser::is_new_arg: Allow hyphen"); @@ -841,7 +841,7 @@ impl<'cmd> Parser<'cmd> { #[allow(clippy::blocks_in_if_conditions)] if matches!(parse_state, ParseState::Opt(opt) | ParseState::Pos(opt) - if self.cmd[opt].is_allow_hyphen_values_set() || (self.cmd[opt].is_allow_negative_numbers_set() && short_arg.is_number())) + if self.cmd[opt].is_allow_hyphen_values_set() || (self.cmd[opt].is_allow_negative_numbers_set() && short_arg.is_negative_number())) { debug!("Parser::parse_short_args: prior arg accepts hyphenated values",); return Ok(ParseResult::MaybeHyphenValue); @@ -851,7 +851,7 @@ impl<'cmd> Parser<'cmd> { .get(&pos_counter) .map(|arg| arg.is_allow_negative_numbers_set()) .unwrap_or_default() - && short_arg.is_number() + && short_arg.is_negative_number() { debug!("Parser::parse_short_arg: negative number"); return Ok(ParseResult::MaybeHyphenValue); -- cgit v1.2.3