@@ -59,17 +59,16 @@ pub extern "C" fn handle_metadata(
5959 . format ( "%Y-%m-%d %H:%M:%S" )
6060 . to_string ( ) ;
6161 let compression = match FromPrimitive :: from_i32 ( unsafe {
62- readstat_sys:: readstat_get_compression ( metadata) as i32
62+ readstat_sys:: readstat_get_compression ( metadata)
6363 } ) {
6464 Some ( t) => t,
6565 None => ReadStatCompress :: None ,
6666 } ;
67- let endianness = match FromPrimitive :: from_i32 ( unsafe {
68- readstat_sys:: readstat_get_endianness ( metadata) as i32
69- } ) {
70- Some ( t) => t,
71- None => ReadStatEndian :: None ,
72- } ;
67+ let endianness =
68+ match FromPrimitive :: from_i32 ( unsafe { readstat_sys:: readstat_get_endianness ( metadata) } ) {
69+ Some ( t) => t,
70+ None => ReadStatEndian :: None ,
71+ } ;
7372
7473 debug ! ( "row_count is {}" , rc) ;
7574 debug ! ( "var_count is {}" , vc) ;
@@ -132,14 +131,14 @@ pub extern "C" fn handle_variable(
132131
133132 // get variable metadata
134133 let var_type = match FromPrimitive :: from_i32 ( unsafe {
135- readstat_sys:: readstat_variable_get_type ( variable) as i32
134+ readstat_sys:: readstat_variable_get_type ( variable)
136135 } ) {
137136 Some ( t) => t,
138137 None => ReadStatVarType :: Unknown ,
139138 } ;
140139
141140 let var_type_class = match FromPrimitive :: from_i32 ( unsafe {
142- readstat_sys:: readstat_variable_get_type_class ( variable) as i32
141+ readstat_sys:: readstat_variable_get_type_class ( variable)
143142 } ) {
144143 Some ( t) => t,
145144 None => ReadStatVarTypeClass :: Numeric ,
0 commit comments