File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -263,10 +263,6 @@ pub mod filters {
263
263
Ok ( serde_json:: to_string ( value) . expect ( "`encode_json` failed" ) )
264
264
}
265
265
266
- pub fn as_f32 ( value : & i32 ) -> rinja:: Result < f32 > {
267
- Ok ( * value as f32 )
268
- }
269
-
270
266
pub fn rest_menu_url ( current_target : & str , inner_path : & str ) -> rinja:: Result < String > {
271
267
if current_target. is_empty ( ) {
272
268
return Ok ( String :: new ( ) ) ;
Original file line number Diff line number Diff line change 26
26
< div class ="pure-menu package-menu ">
27
27
< ul class ="pure-menu-list ">
28
28
{%- if let (Some(documented), Some(total)) = (documented_items, total_items) -%}
29
- {% set documented_f32 = documented|as_f32 %}
30
- {% set total_f32 = total|as_f32 %}
29
+ {% set documented_f32 = documented as f32 %}
30
+ {% set total_f32 = total as f32 %}
31
31
{% set percent = documented_f32 * 100f32 / total_f32 %}
32
32
< li class ="pure-menu-heading "> Coverage</ li >
33
33
< li class ="pure-menu-item text-center "> < b > {{ percent|round(2) }}%</ b > < br >
Original file line number Diff line number Diff line change 149
149
</ div >
150
150
</ div >
151
151
{%- if let (Some(documented), Some(total)) = (krate.documented_items, krate.total_items) -%}
152
- {% set documented = documented|as_f32 %}
153
- {% set total = total|as_f32 %}
152
+ {% set documented = documented as f32 %}
153
+ {% set total = total as f32 %}
154
154
{% set percent = documented * 100f32 / total %}
155
155
< div class ="pure-g ">
156
156
< div class ="pure-u-1 ">
You can’t perform that action at this time.
0 commit comments