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