File tree 1 file changed +17
-13
lines changed
1 file changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -518,6 +518,7 @@ macro_rules! create_config {
518
518
519
519
pub fn print_docs( ) {
520
520
use std:: cmp;
521
+ const HIDE_OPTIONS : [ & str ; 3 ] = [ "verbose" , "file_lines" , "width_heuristics" ] ;
521
522
let max = 0 ;
522
523
$( let max = cmp:: max( max, stringify!( $i) . len( ) +1 ) ; ) +
523
524
let mut space_str = String :: with_capacity( max) ;
@@ -527,20 +528,23 @@ macro_rules! create_config {
527
528
println!( "Configuration Options:" ) ;
528
529
$(
529
530
let name_raw = stringify!( $i) ;
530
- let mut name_out = String :: with_capacity( max) ;
531
- for _ in name_raw. len( ) ..max-1 {
532
- name_out. push( ' ' )
531
+
532
+ if !HIDE_OPTIONS . contains( & name_raw) {
533
+ let mut name_out = String :: with_capacity( max) ;
534
+ for _ in name_raw. len( ) ..max-1 {
535
+ name_out. push( ' ' )
536
+ }
537
+ name_out. push_str( name_raw) ;
538
+ name_out. push( ' ' ) ;
539
+ println!( "{}{} Default: {:?}" ,
540
+ name_out,
541
+ <$ty>:: doc_hint( ) ,
542
+ $def) ;
543
+ $(
544
+ println!( "{}{}" , space_str, $dstring) ;
545
+ ) +
546
+ println!( ) ;
533
547
}
534
- name_out. push_str( name_raw) ;
535
- name_out. push( ' ' ) ;
536
- println!( "{}{} Default: {:?}" ,
537
- name_out,
538
- <$ty>:: doc_hint( ) ,
539
- $def) ;
540
- $(
541
- println!( "{}{}" , space_str, $dstring) ;
542
- ) +
543
- println!( ) ;
544
548
) +
545
549
}
546
550
You can’t perform that action at this time.
0 commit comments