File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -546,18 +546,22 @@ impl DocBuilder {
546
546
// check crate name
547
547
let mut crate_path = PathBuf :: from ( & path) ;
548
548
crate_path. push ( & crte. name ) ;
549
- src_path. push ( & crate_path ) ;
549
+ src_path. push ( & crte . name ) ;
550
550
if crate_path. exists ( ) && src_path. exists ( ) {
551
551
return Ok ( ( crate_path, src_path) ) ;
552
552
}
553
553
554
554
// some crates are using '-' in their name but actual name contains '_'
555
555
let actual_crate_name = & crte. name . replace ( "-" , "_" ) ;
556
+ // I need another fresh src_path here
557
+ // FIXME: This function became a mess after I introduced src_path
558
+ let mut src_path = self . crate_root_dir ( crte, version_index) ;
559
+ src_path. push ( "target/doc/src" ) ;
556
560
// I think it's safe to push into path now
557
561
path. push ( actual_crate_name) ;
558
562
src_path. push ( actual_crate_name) ;
559
563
if path. exists ( ) && src_path. exists ( ) {
560
- return Ok ( ( crate_path , src_path) ) ;
564
+ return Ok ( ( path , src_path) ) ;
561
565
}
562
566
563
567
Err ( DocBuilderError :: DocumentationNotFound )
You can’t perform that action at this time.
0 commit comments