From dd8e2427732f12b0825beaf87f301f0768f07ba5 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. Fixes #4326 --- src/parser/parser.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/parser/parser.rs b/src/parser/parser.rs index f2a05c333f2..dec42b77a2b 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,