Skip to content

Commit

Permalink
WIP: fix!: Make Set the default action
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jul 26, 2022
1 parent ee06707 commit 45aab30
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/builder/arg.rs
Expand Up @@ -4269,9 +4269,6 @@ impl<'help> Arg<'help> {
/// # Internally used only
impl<'help> Arg<'help> {
pub(crate) fn _build(&mut self) {
if self.is_positional() {
self.settings.set(ArgSettings::TakesValue);
}
if self.action.is_none() {
if self.get_id() == "help" && !self.is_takes_value_set() {
let action = super::ArgAction::Help;
Expand Down
2 changes: 1 addition & 1 deletion src/builder/arg_settings.rs
Expand Up @@ -14,7 +14,7 @@ pub(crate) struct ArgFlags(Flags);

impl Default for ArgFlags {
fn default() -> Self {
Self::empty()
ArgFlags(Flags::TAKES_VAL)
}
}

Expand Down

0 comments on commit 45aab30

Please sign in to comment.