@@ -387,8 +387,6 @@ struct Item<'a> {
387
387
item : & ' a clean:: Item ,
388
388
}
389
389
390
- struct Sidebar < ' a > { cx : & ' a Context , item : & ' a clean:: Item , }
391
-
392
390
/// Struct representing one entry in the JS search index. These are all emitted
393
391
/// by hand to a large JS file at the end of cache-creation.
394
392
#[ derive( Debug ) ]
@@ -1994,7 +1992,7 @@ impl Context {
1994
1992
1995
1993
if !self . render_redirect_pages {
1996
1994
layout:: render ( & self . shared . layout , & page,
1997
- Sidebar { cx : self , item : it } ,
1995
+ | buf : & mut _ | print_sidebar ( self , it , buf ) ,
1998
1996
& Item { cx : self , item : it } ,
1999
1997
& self . shared . themes )
2000
1998
} else {
@@ -4266,10 +4264,7 @@ fn item_foreign_type(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item)
4266
4264
render_assoc_items ( w, cx, it, it. def_id , AssocItemRender :: All )
4267
4265
}
4268
4266
4269
- impl Print for Sidebar < ' _ > {
4270
- fn print ( self , buffer : & mut Buffer ) {
4271
- let cx = self . cx ;
4272
- let it = self . item ;
4267
+ fn print_sidebar ( cx : & Context , it : & clean:: Item , buffer : & mut Buffer ) {
4273
4268
let parentlen = cx. current . len ( ) - if it. is_mod ( ) { 1 } else { 0 } ;
4274
4269
4275
4270
if it. is_struct ( ) || it. is_trait ( ) || it. is_primitive ( ) || it. is_union ( )
@@ -4360,7 +4355,6 @@ impl Print for Sidebar<'_> {
4360
4355
// Closes sidebar-elems div.
4361
4356
write ! ( buffer, "</div>" ) ;
4362
4357
}
4363
- }
4364
4358
4365
4359
fn get_next_url ( used_links : & mut FxHashSet < String > , url : String ) -> String {
4366
4360
if used_links. insert ( url. clone ( ) ) {
0 commit comments