summaryrefslogtreecommitdiffstats
path: root/vendor/clap_builder/src/parser
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/clap_builder/src/parser')
-rw-r--r--vendor/clap_builder/src/parser/parser.rs6
1 files changed, 3 insertions, 3 deletions
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);