@@ -589,21 +589,21 @@ fn build_index(krate: &clean::Crate, cache: &mut Cache) -> String {
589589
590590 for item in search_index {
591591 item. parent_idx = item. parent . and_then ( |defid| {
592- if defid_to_pathid. contains_key ( & defid) {
593- defid_to_pathid. get ( & defid) . map ( |x| * x)
594- } else {
595- let pathid = lastpathid;
596- defid_to_pathid. insert ( defid, pathid) ;
597- lastpathid += 1 ;
598-
599- if let Some ( & ( ref fqp, short) ) = paths. get ( & defid) {
600- crate_paths. push ( ( short, fqp. last ( ) . unwrap ( ) . clone ( ) ) ) ;
601- Some ( pathid)
592+ if defid_to_pathid. contains_key ( & defid) {
593+ defid_to_pathid. get ( & defid) . map ( |x| * x)
602594 } else {
603- None
595+ let pathid = lastpathid;
596+ defid_to_pathid. insert ( defid, pathid) ;
597+ lastpathid += 1 ;
598+
599+ if let Some ( & ( ref fqp, short) ) = paths. get ( & defid) {
600+ crate_paths. push ( ( short, fqp. last ( ) . unwrap ( ) . clone ( ) ) ) ;
601+ Some ( pathid)
602+ } else {
603+ None
604+ }
604605 }
605- }
606- } ) ;
606+ } ) ;
607607
608608 // Omit the parent path if it is same to that of the prior item.
609609 if lastpath == item. path {
@@ -697,10 +697,12 @@ fn get_generics(clean_type: &clean::Type) -> Option<Vec<Generic>> {
697697 clean_type. generics ( ) . and_then ( |types| {
698698 let r = types
699699 . iter ( )
700- . filter_map ( |t| if let Some ( name) = get_index_type_name ( t, false ) {
701- Some ( Generic { name : name. to_ascii_lowercase ( ) , defid : t. def_id ( ) , idx : None } )
702- } else {
703- None
700+ . filter_map ( |t| {
701+ if let Some ( name) = get_index_type_name ( t, false ) {
702+ Some ( Generic { name : name. to_ascii_lowercase ( ) , defid : t. def_id ( ) , idx : None } )
703+ } else {
704+ None
705+ }
704706 } )
705707 . collect :: < Vec < _ > > ( ) ;
706708 if r. is_empty ( ) { None } else { Some ( r) }
0 commit comments