@@ -1353,7 +1353,7 @@ impl Context {
1353
1353
// these modules are recursed into, but not rendered normally
1354
1354
// (a flag on the context).
1355
1355
if !self . render_redirect_pages {
1356
- self . render_redirect_pages = self . maybe_ignore_item ( & item) ;
1356
+ self . render_redirect_pages = maybe_ignore_item ( & item) ;
1357
1357
}
1358
1358
1359
1359
if item. is_mod ( ) {
@@ -1436,7 +1436,7 @@ impl Context {
1436
1436
// BTreeMap instead of HashMap to get a sorted output
1437
1437
let mut map = BTreeMap :: new ( ) ;
1438
1438
for item in & m. items {
1439
- if self . maybe_ignore_item ( item) { continue }
1439
+ if maybe_ignore_item ( item) { continue }
1440
1440
1441
1441
let short = item_type ( item) . css_class ( ) ;
1442
1442
let myname = match item. name {
@@ -1453,17 +1453,6 @@ impl Context {
1453
1453
}
1454
1454
return map;
1455
1455
}
1456
-
1457
- fn maybe_ignore_item ( & self , it : & clean:: Item ) -> bool {
1458
- match it. inner {
1459
- clean:: StrippedItem ( ..) => true ,
1460
- clean:: ModuleItem ( ref m) => {
1461
- it. doc_value ( ) . is_none ( ) && m. items . is_empty ( )
1462
- && it. visibility != Some ( clean:: Public )
1463
- } ,
1464
- _ => false ,
1465
- }
1466
- }
1467
1456
}
1468
1457
1469
1458
impl < ' a > Item < ' a > {
@@ -1706,7 +1695,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
1706
1695
if let clean:: DefaultImplItem ( ..) = items[ * i] . inner {
1707
1696
return false ;
1708
1697
}
1709
- !cx . maybe_ignore_item ( & items[ * i] )
1698
+ !maybe_ignore_item ( & items[ * i] )
1710
1699
} ) . collect :: < Vec < usize > > ( ) ;
1711
1700
1712
1701
// the order of item types in the listing
@@ -1854,6 +1843,17 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
1854
1843
Ok ( ( ) )
1855
1844
}
1856
1845
1846
+ fn maybe_ignore_item ( it : & clean:: Item ) -> bool {
1847
+ match it. inner {
1848
+ clean:: StrippedItem ( ..) => true ,
1849
+ clean:: ModuleItem ( ref m) => {
1850
+ it. doc_value ( ) . is_none ( ) && m. items . is_empty ( )
1851
+ && it. visibility != Some ( clean:: Public )
1852
+ } ,
1853
+ _ => false ,
1854
+ }
1855
+ }
1856
+
1857
1857
fn short_stability ( item : & clean:: Item , cx : & Context , show_reason : bool ) -> Vec < String > {
1858
1858
let mut stability = vec ! [ ] ;
1859
1859
0 commit comments