@@ -531,9 +531,9 @@ impl<'b, 'a> Cmd<'a> {
531
531
/// Returns the option argument with the specified name.
532
532
///
533
533
/// If the option has multiple arguments, this method returns the first argument.
534
- ///
535
- /// Since the option may not be specified in the command line arguments,
536
- /// the return value of this method is an [Option] of an option argument or [None].
534
+ /// If the option a boolean flag, this method returns [None].
535
+ /// If the option is not specified in the command line argument, the return value
536
+ /// of this method is [None].
537
537
pub fn opt_arg ( & ' a self , name : & str ) -> Option < & ' a str > {
538
538
if let Some ( opt_vec) = self . opts . get ( name) {
539
539
if opt_vec. len ( ) > 0 {
@@ -546,9 +546,9 @@ impl<'b, 'a> Cmd<'a> {
546
546
/// Returns the option arguments with the specified name.
547
547
///
548
548
/// If the option has one or multiple arguments, this method returns an array of the arguments.
549
- ///
550
- /// Since the option may not be specified in the command line arguments , the return value of
551
- /// this method is an [Option] of option arguments or [None].
549
+ /// If the option a boolean flag, this method returns an empty vector.
550
+ /// If the option is not specified in the command line argument , the return value
551
+ /// of this method is [None].
552
552
pub fn opt_args ( & ' a self , name : & str ) -> Option < & ' a [ & ' a str ] > {
553
553
match self . opts . get ( name) {
554
554
Some ( vec) => Some ( & vec) ,
0 commit comments