@@ -483,7 +483,7 @@ fn generate_item_def_id_path(
483483 let mut is_remote = false ;
484484
485485 let url_parts = url_parts ( cx. cache ( ) , def_id, module_fqp, & cx. current , & mut is_remote) ?;
486- let ( mut url_parts, shortty ) = make_href ( root_path, shortty, url_parts, & fqp, is_remote) ? ;
486+ let mut url_parts = make_href ( root_path, shortty, url_parts, & fqp, is_remote) ;
487487 if def_id != original_def_id {
488488 let kind = ItemType :: from_def_kind ( original_def_kind, Some ( def_kind) ) ;
489489 url_parts = format ! ( "{url_parts}#{kind}.{}" , tcx. item_name( original_def_id) )
@@ -521,7 +521,7 @@ fn make_href(
521521 mut url_parts : UrlPartsBuilder ,
522522 fqp : & [ Symbol ] ,
523523 is_remote : bool ,
524- ) -> Result < ( String , ItemType ) , HrefError > {
524+ ) -> String {
525525 if !is_remote && let Some ( root_path) = root_path {
526526 let root = root_path. trim_end_matches ( '/' ) ;
527527 url_parts. push_front ( root) ;
@@ -536,7 +536,7 @@ fn make_href(
536536 url_parts. push_fmt ( format_args ! ( "{shortty}.{last}.html" ) ) ;
537537 }
538538 }
539- Ok ( ( url_parts. finish ( ) , shortty ) )
539+ url_parts. finish ( )
540540}
541541
542542pub ( crate ) fn href_with_root_path (
@@ -606,8 +606,8 @@ pub(crate) fn href_with_root_path(
606606 }
607607 }
608608 } ;
609- make_href ( root_path, shortty, url_parts, fqp, is_remote)
610- . map ( | ( url_parts, short_ty ) | ( url_parts , short_ty , fqp. clone ( ) ) )
609+ let url_parts = make_href ( root_path, shortty, url_parts, & fqp, is_remote) ;
610+ Ok ( ( url_parts, shortty , fqp. clone ( ) ) )
611611}
612612
613613pub ( crate ) fn href (
0 commit comments