File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/librustdoc/html/render Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -446,13 +446,13 @@ impl CratesIndexPart {
446
446
/// Might return parts that are duplicate with ones in prexisting index.html
447
447
fn get ( crate_name : & str , external_crates : & [ String ] ) -> Result < PartsAndLocations < Self > , Error > {
448
448
let mut ret = PartsAndLocations :: default ( ) ;
449
- let path = PathBuf :: from ( "index.html" ) ;
449
+ let path = Path :: new ( "index.html" ) ;
450
450
for crate_name in external_crates. iter ( ) . map ( |s| s. as_str ( ) ) . chain ( once ( crate_name) ) {
451
451
let part = format ! (
452
452
"<li><a href=\" {trailing_slash}index.html\" >{crate_name}</a></li>" ,
453
453
trailing_slash = ensure_trailing_slash( crate_name) ,
454
454
) ;
455
- ret. push ( path. clone ( ) , part) ;
455
+ ret. push ( path. to_path_buf ( ) , part) ;
456
456
}
457
457
Ok ( ret)
458
458
}
You can’t perform that action at this time.
0 commit comments