Skip to content

Commit

Permalink
Remove the ArgRequiredElseHelp setting on subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenroose committed Apr 14, 2020
1 parent f5b7498 commit e9c8211
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/bin/hal/cmd/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub fn execute<'a>(matches: &clap::ArgMatches<'a>) {

fn cmd_create<'a>() -> clap::App<'a, 'a> {
cmd::subcommand("create", "create a raw block from JSON")
.unset_setting(clap::AppSettings::ArgRequiredElseHelp)
.args(&[
cmd::arg("block-info", "the block info in JSON").required(false),
cmd::opt("raw-stdout", "output the raw bytes of the result to stdout")
Expand Down
1 change: 0 additions & 1 deletion src/bin/hal/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ pub fn subcommand_group<'a>(name: &'static str, about: &'static str) -> clap::Ap
pub fn subcommand<'a>(name: &'static str, about: &'static str) -> clap::App<'a, 'a> {
clap::SubCommand::with_name(name)
.about(about)
.setting(clap::AppSettings::ArgRequiredElseHelp)
.setting(clap::AppSettings::DisableHelpSubcommand)
}

Expand Down
1 change: 0 additions & 1 deletion src/bin/hal/cmd/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pub fn execute<'a>(matches: &clap::ArgMatches<'a>) {

fn cmd_create<'a>() -> clap::App<'a, 'a> {
cmd::subcommand("create", "create a raw transaction from JSON")
.unset_setting(clap::AppSettings::ArgRequiredElseHelp)
.args(&[
cmd::arg("tx-info", "the transaction info in JSON; If omitted, reads from stdin.")
.required(false),
Expand Down

0 comments on commit e9c8211

Please sign in to comment.