@@ -400,22 +400,25 @@ pub fn cli() -> App<'static, 'static> {
400
400
. help ( "Only print the path to the documentation" ) ,
401
401
)
402
402
. args (
403
- & DOCS_DATA . into_iter ( ) . map ( |( name, help_msg, _) | {
404
- Arg :: with_name ( name)
405
- . long ( name)
406
- . help ( help_msg)
407
- } ) . collect :: < Vec < _ > > ( )
403
+ & DOCS_DATA
404
+ . into_iter ( )
405
+ . map ( |( name, help_msg, _) | Arg :: with_name ( name) . long ( name) . help ( help_msg) )
406
+ . collect :: < Vec < _ > > ( ) ,
408
407
)
409
408
. arg (
410
409
Arg :: with_name ( "toolchain" )
411
410
. help ( TOOLCHAIN_ARG_HELP )
412
411
. long ( "toolchain" )
413
412
. takes_value ( true ) ,
414
413
)
415
- . group ( ArgGroup :: with_name ( "page" ) . args (
416
- & DOCS_DATA . into_iter ( ) . map ( |( name, _, _) | * name)
417
- . collect :: < Vec < _ > > ( )
418
- ) ) ,
414
+ . group (
415
+ ArgGroup :: with_name ( "page" ) . args (
416
+ & DOCS_DATA
417
+ . into_iter ( )
418
+ . map ( |( name, _, _) | * name)
419
+ . collect :: < Vec < _ > > ( ) ,
420
+ ) ,
421
+ ) ,
419
422
) ;
420
423
421
424
if cfg ! ( not( target_os = "windows" ) ) {
@@ -987,12 +990,14 @@ const DOCS_DATA: &[(&'static str, &'static str, &'static str,)] = &[
987
990
fn doc ( cfg : & Cfg , m : & ArgMatches ) -> Result < ( ) > {
988
991
let toolchain = explicit_or_dir_toolchain ( cfg, m) ?;
989
992
990
- let doc_url =
991
- if let Some ( ( _, _, path) ) = DOCS_DATA . into_iter ( ) . find ( |( name, _, _) | m. is_present ( name) ) {
992
- path
993
- } else {
994
- "index.html"
995
- } ;
993
+ let doc_url = if let Some ( ( _, _, path) ) = DOCS_DATA
994
+ . into_iter ( )
995
+ . find ( |( name, _, _) | m. is_present ( name) )
996
+ {
997
+ path
998
+ } else {
999
+ "index.html"
1000
+ } ;
996
1001
997
1002
if m. is_present ( "path" ) {
998
1003
let doc_path = toolchain. doc_path ( doc_url) ?;
0 commit comments