@@ -349,7 +349,7 @@ fn build_options<O: Default>(
349
349
#[ allow( non_upper_case_globals) ]
350
350
mod desc {
351
351
pub const parse_no_flag: & str = "no value" ;
352
- pub const parse_bool: & str = "one of: `y`, `yes`, `on`, `n`, `no`, or `off `" ;
352
+ pub const parse_bool: & str = "one of: `y`, `yes`, `on`, `true`, ` n`, `no`, `off` or `false `" ;
353
353
pub const parse_opt_bool: & str = parse_bool;
354
354
pub const parse_string: & str = "a string" ;
355
355
pub const parse_opt_string: & str = parse_string;
@@ -432,11 +432,11 @@ mod parse {
432
432
/// Use this for any boolean option that has a static default.
433
433
pub ( crate ) fn parse_bool ( slot : & mut bool , v : Option < & str > ) -> bool {
434
434
match v {
435
- Some ( "y" ) | Some ( "yes" ) | Some ( "on" ) | None => {
435
+ Some ( "y" ) | Some ( "yes" ) | Some ( "on" ) | Some ( "true" ) | None => {
436
436
* slot = true ;
437
437
true
438
438
}
439
- Some ( "n" ) | Some ( "no" ) | Some ( "off" ) => {
439
+ Some ( "n" ) | Some ( "no" ) | Some ( "off" ) | Some ( "false" ) => {
440
440
* slot = false ;
441
441
true
442
442
}
@@ -449,11 +449,11 @@ mod parse {
449
449
/// other factors, such as other options, or target options.)
450
450
pub ( crate ) fn parse_opt_bool ( slot : & mut Option < bool > , v : Option < & str > ) -> bool {
451
451
match v {
452
- Some ( "y" ) | Some ( "yes" ) | Some ( "on" ) | None => {
452
+ Some ( "y" ) | Some ( "yes" ) | Some ( "on" ) | Some ( "true" ) | None => {
453
453
* slot = Some ( true ) ;
454
454
true
455
455
}
456
- Some ( "n" ) | Some ( "no" ) | Some ( "off" ) => {
456
+ Some ( "n" ) | Some ( "no" ) | Some ( "off" ) | Some ( "false" ) => {
457
457
* slot = Some ( false ) ;
458
458
true
459
459
}
0 commit comments