mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
Apply suggestions
This commit is contained in:
parent
a1d4bd8488
commit
d36b201fd6
1 changed files with 3 additions and 2 deletions
|
@ -4174,6 +4174,7 @@ impl<'help> Arg<'help> {
|
|||
/// # use clap::{App, Arg, ArgSettings};
|
||||
/// Arg::new("file")
|
||||
/// .long("file")
|
||||
/// .takes_value(true)
|
||||
/// .forbid_empty_values(true)
|
||||
/// # ;
|
||||
/// ```
|
||||
|
@ -4214,8 +4215,8 @@ impl<'help> Arg<'help> {
|
|||
/// ```
|
||||
/// [`ArgSettings::TakesValue`]: ./enum.ArgSettings.html#variant.TakesValue
|
||||
#[inline]
|
||||
pub fn forbid_empty_values(self, multi: bool) -> Self {
|
||||
if multi {
|
||||
pub fn forbid_empty_values(self, empty: bool) -> Self {
|
||||
if empty {
|
||||
self.setting(ArgSettings::NoEmptyValues)
|
||||
} else {
|
||||
self.unset_setting(ArgSettings::NoEmptyValues)
|
||||
|
|
Loading…
Reference in a new issue