@@ -34,6 +34,8 @@ use crate::html::markdown::MarkdownSummaryLine;
34
34
35
35
const ITEM_TABLE_OPEN : & ' static str = "<div class=\" item-table\" >" ;
36
36
const ITEM_TABLE_CLOSE : & ' static str = "</div>" ;
37
+ const ITEM_TABLE_ROW_OPEN : & ' static str = "<div class=\" item-row\" >" ;
38
+ const ITEM_TABLE_ROW_CLOSE : & ' static str = "</div>" ;
37
39
38
40
pub ( super ) fn print_item ( cx : & Context < ' _ > , item : & clean:: Item , buf : & mut Buffer , page : & Page < ' _ > ) {
39
41
debug_assert ! ( !item. is_stripped( ) ) ;
@@ -256,9 +258,6 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
256
258
257
259
debug ! ( "{:?}" , indices) ;
258
260
let mut curty = None ;
259
- // See: https://github.com/rust-lang/rust/issues/88545
260
- let item_table_block_size = 900usize ;
261
- let mut item_table_nth_element = 0usize ;
262
261
263
262
for & idx in & indices {
264
263
let myitem = & items[ idx] ;
@@ -285,13 +284,13 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
285
284
id = cx. derive_id( short. to_owned( ) ) ,
286
285
name = name
287
286
) ;
288
- item_table_nth_element = 0 ;
289
287
}
290
288
291
289
match * myitem. kind {
292
290
clean:: ExternCrateItem { ref src } => {
293
291
use crate :: html:: format:: anchor;
294
292
293
+ w. write_str ( ITEM_TABLE_ROW_OPEN ) ;
295
294
match * src {
296
295
Some ( ref src) => write ! (
297
296
w,
@@ -312,6 +311,7 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
312
311
) ,
313
312
}
314
313
w. write_str ( "</code></div>" ) ;
314
+ w. write_str ( ITEM_TABLE_ROW_CLOSE ) ;
315
315
}
316
316
317
317
clean:: ImportItem ( ref import) => {
@@ -336,6 +336,7 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
336
336
337
337
let add = if stab. is_some ( ) { " " } else { "" } ;
338
338
339
+ w. write_str ( ITEM_TABLE_ROW_OPEN ) ;
339
340
write ! (
340
341
w,
341
342
"<div class=\" item-left {stab}{add}import-item\" >\
@@ -348,6 +349,7 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
348
349
imp = import. print( cx) ,
349
350
stab_tags = stab_tags. unwrap_or_default( ) ,
350
351
) ;
352
+ w. write_str ( ITEM_TABLE_ROW_CLOSE ) ;
351
353
}
352
354
353
355
_ => {
@@ -368,6 +370,7 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
368
370
let add = if stab. is_some ( ) { " " } else { "" } ;
369
371
370
372
let doc_value = myitem. doc_value ( ) . unwrap_or_default ( ) ;
373
+ w. write_str ( ITEM_TABLE_ROW_OPEN ) ;
371
374
write ! (
372
375
w,
373
376
"<div class=\" item-left {stab}{add}module-item\" >\
@@ -390,15 +393,9 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
390
393
. collect:: <Vec <_>>( )
391
394
. join( " " ) ,
392
395
) ;
396
+ w. write_str ( ITEM_TABLE_ROW_CLOSE ) ;
393
397
}
394
398
}
395
-
396
- item_table_nth_element += 1 ;
397
- if item_table_nth_element > item_table_block_size {
398
- w. write_str ( ITEM_TABLE_CLOSE ) ;
399
- w. write_str ( ITEM_TABLE_OPEN ) ;
400
- item_table_nth_element = 0 ;
401
- }
402
399
}
403
400
404
401
if curty. is_some ( ) {
0 commit comments