@@ -588,21 +588,21 @@ fn build_index(krate: &clean::Crate, cache: &mut Cache) -> String {
588
588
589
589
for item in search_index {
590
590
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)
601
593
} 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
+ }
603
604
}
604
- }
605
- } ) ;
605
+ } ) ;
606
606
607
607
// Omit the parent path if it is same to that of the prior item.
608
608
if lastpath == item. path {
@@ -696,10 +696,12 @@ fn get_generics(clean_type: &clean::Type) -> Option<Vec<Generic>> {
696
696
clean_type. generics ( ) . and_then ( |types| {
697
697
let r = types
698
698
. 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
+ }
703
705
} )
704
706
. collect :: < Vec < _ > > ( ) ;
705
707
if r. is_empty ( ) { None } else { Some ( r) }
0 commit comments