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