@@ -2579,27 +2579,15 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
2579
2579
stability
2580
2580
}
2581
2581
2582
- struct Initializer < ' a > ( & ' a str ) ;
2583
-
2584
- impl < ' a > fmt:: Display for Initializer < ' a > {
2585
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
2586
- let Initializer ( s) = * self ;
2587
- if s. is_empty ( ) { return Ok ( ( ) ) ; }
2588
- write ! ( f, "<code> = </code>" ) ?;
2589
- write ! ( f, "<code>{}</code>" , Escape ( s) )
2590
- }
2591
- }
2592
-
2593
2582
fn item_constant ( w : & mut fmt:: Formatter , cx : & Context , it : & clean:: Item ,
2594
2583
c : & clean:: Constant ) -> fmt:: Result {
2595
2584
write ! ( w, "<pre class='rust const'>" ) ?;
2596
2585
render_attributes ( w, it) ?;
2597
2586
write ! ( w, "{vis}const \
2598
- {name}: {typ}{init} </pre>",
2587
+ {name}: {typ}</pre>",
2599
2588
vis = VisSpace ( & it. visibility) ,
2600
2589
name = it. name. as_ref( ) . unwrap( ) ,
2601
- typ = c. type_,
2602
- init = Initializer ( & c. expr) ) ?;
2590
+ typ = c. type_) ?;
2603
2591
document ( w, cx, it)
2604
2592
}
2605
2593
@@ -2608,12 +2596,11 @@ fn item_static(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
2608
2596
write ! ( w, "<pre class='rust static'>" ) ?;
2609
2597
render_attributes ( w, it) ?;
2610
2598
write ! ( w, "{vis}static {mutability}\
2611
- {name}: {typ}{init} </pre>",
2599
+ {name}: {typ}</pre>",
2612
2600
vis = VisSpace ( & it. visibility) ,
2613
2601
mutability = MutableSpace ( s. mutability) ,
2614
2602
name = it. name. as_ref( ) . unwrap( ) ,
2615
- typ = s. type_,
2616
- init = Initializer ( & s. expr) ) ?;
2603
+ typ = s. type_) ?;
2617
2604
document ( w, cx, it)
2618
2605
}
2619
2606
0 commit comments