@@ -39,10 +39,10 @@ pub struct CrateDetails {
3939 is_library : bool ,
4040 license : Option < String > ,
4141 pub ( crate ) documentation_url : Option < String > ,
42- total_items : Option < f32 > ,
43- documented_items : Option < f32 > ,
44- total_items_needing_examples : Option < f32 > ,
45- items_with_examples : Option < f32 > ,
42+ total_items : Option < i32 > ,
43+ documented_items : Option < i32 > ,
44+ total_items_needing_examples : Option < i32 > ,
45+ items_with_examples : Option < i32 > ,
4646 /// Database id for this crate
4747 pub ( crate ) crate_id : i32 ,
4848 /// Database id for this release
@@ -166,11 +166,6 @@ impl CrateDetails {
166166 rustdoc_css_file : get_correct_docsrs_style_file ( krate. get ( "doc_rustc_version" ) ) ?,
167167 } ;
168168
169- let documented_items: Option < i32 > = krate. get ( "documented_items" ) ;
170- let total_items: Option < i32 > = krate. get ( "total_items" ) ;
171- let total_items_needing_examples: Option < i32 > = krate. get ( "total_items_needing_examples" ) ;
172- let items_with_examples: Option < i32 > = krate. get ( "items_with_examples" ) ;
173-
174169 let mut crate_details = CrateDetails {
175170 name : krate. get ( "name" ) ,
176171 version : krate. get ( "version" ) ,
@@ -195,10 +190,10 @@ impl CrateDetails {
195190 is_library : krate. get ( "is_library" ) ,
196191 license : krate. get ( "license" ) ,
197192 documentation_url : krate. get ( "documentation_url" ) ,
198- documented_items : documented_items . map ( |v| v as f32 ) ,
199- total_items : total_items . map ( |v| v as f32 ) ,
200- total_items_needing_examples : total_items_needing_examples . map ( |v| v as f32 ) ,
201- items_with_examples : items_with_examples . map ( |v| v as f32 ) ,
193+ documented_items : krate . get ( "documented_items" ) ,
194+ total_items : krate . get ( "total_items" ) ,
195+ total_items_needing_examples : krate . get ( "total_items_needing_examples" ) ,
196+ items_with_examples : krate . get ( "items_with_examples" ) ,
202197 crate_id,
203198 release_id,
204199 } ;
0 commit comments