From 02ec949532a05c7c94fbe312b2e7b21889e177a5 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Sat, 1 Oct 2022 13:36:09 -0500 Subject: [PATCH] fix(parser): Allow defaults for Help/Version These didn't make sense for the builder but are helpful for the derive. The assert was assuming people wouldn't do this and to catch internal problems. --- src/parser/parser.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/parser/parser.rs b/src/parser/parser.rs index f2a05c333f29..dec42b77a2bb 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -1274,7 +1274,6 @@ impl<'cmd> Parser<'cmd> { Ok(ParseResult::ValuesDone) } ArgAction::Help => { - debug_assert_eq!(raw_vals, Vec::::new()); let use_long = match ident { Some(Identifier::Long) => true, Some(Identifier::Short) => false, @@ -1285,7 +1284,6 @@ impl<'cmd> Parser<'cmd> { Err(self.help_err(use_long)) } ArgAction::Version => { - debug_assert_eq!(raw_vals, Vec::::new()); let use_long = match ident { Some(Identifier::Long) => true, Some(Identifier::Short) => false,