File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -479,12 +479,16 @@ impl Step for Std {
479
479
// Look for library/std, library/core etc in the `x.py doc` arguments and
480
480
// open the corresponding rendered docs.
481
481
for path in builder. paths . iter ( ) . map ( components_simplified) {
482
- if path. get ( 0 ) == Some ( & "library" ) {
483
- let requested_crate = & path[ 1 ] ;
484
- if krates. contains ( & requested_crate) {
485
- let index = out. join ( requested_crate) . join ( "index.html" ) ;
486
- open ( builder, & index) ;
487
- }
482
+ let requested_crate = if path. get ( 0 ) == Some ( & "library" ) {
483
+ & path[ 1 ]
484
+ } else if !path. is_empty ( ) {
485
+ & path[ 0 ]
486
+ } else {
487
+ continue ;
488
+ } ;
489
+ if krates. contains ( & requested_crate) {
490
+ let index = out. join ( requested_crate) . join ( "index.html" ) ;
491
+ open ( builder, & index) ;
488
492
}
489
493
}
490
494
}
You can’t perform that action at this time.
0 commit comments