@@ -164,10 +164,8 @@ impl Type<Odbc> for u32 {
164164 OdbcTypeInfo :: INTEGER
165165 }
166166 fn compatible ( ty : & OdbcTypeInfo ) -> bool {
167- matches ! (
168- ty. data_type( ) ,
169- DataType :: Integer | DataType :: BigInt
170- ) || ty. data_type ( ) . accepts_character_data ( ) // Allow parsing from strings
167+ matches ! ( ty. data_type( ) , DataType :: Integer | DataType :: BigInt )
168+ || ty. data_type ( ) . accepts_character_data ( ) // Allow parsing from strings
171169 }
172170}
173171
@@ -178,7 +176,10 @@ impl Type<Odbc> for u64 {
178176 fn compatible ( ty : & OdbcTypeInfo ) -> bool {
179177 matches ! (
180178 ty. data_type( ) ,
181- DataType :: BigInt | DataType :: Integer | DataType :: Numeric { .. } | DataType :: Decimal { .. }
179+ DataType :: BigInt
180+ | DataType :: Integer
181+ | DataType :: Numeric { .. }
182+ | DataType :: Decimal { .. }
182183 ) || ty. data_type ( ) . accepts_character_data ( ) // Allow parsing from strings
183184 }
184185}
@@ -213,7 +214,8 @@ mod chrono_types {
213214 OdbcTypeInfo :: TIME
214215 }
215216 fn compatible ( ty : & OdbcTypeInfo ) -> bool {
216- matches ! ( ty. data_type( ) , DataType :: Time { .. } ) || ty. data_type ( ) . accepts_character_data ( )
217+ matches ! ( ty. data_type( ) , DataType :: Time { .. } )
218+ || ty. data_type ( ) . accepts_character_data ( )
217219 }
218220 }
219221
@@ -222,7 +224,8 @@ mod chrono_types {
222224 OdbcTypeInfo :: TIMESTAMP
223225 }
224226 fn compatible ( ty : & OdbcTypeInfo ) -> bool {
225- matches ! ( ty. data_type( ) , DataType :: Timestamp { .. } ) || ty. data_type ( ) . accepts_character_data ( )
227+ matches ! ( ty. data_type( ) , DataType :: Timestamp { .. } )
228+ || ty. data_type ( ) . accepts_character_data ( )
226229 }
227230 }
228231
@@ -231,7 +234,8 @@ mod chrono_types {
231234 OdbcTypeInfo :: TIMESTAMP
232235 }
233236 fn compatible ( ty : & OdbcTypeInfo ) -> bool {
234- matches ! ( ty. data_type( ) , DataType :: Timestamp { .. } ) || ty. data_type ( ) . accepts_character_data ( )
237+ matches ! ( ty. data_type( ) , DataType :: Timestamp { .. } )
238+ || ty. data_type ( ) . accepts_character_data ( )
235239 }
236240 }
237241
@@ -240,7 +244,8 @@ mod chrono_types {
240244 OdbcTypeInfo :: TIMESTAMP
241245 }
242246 fn compatible ( ty : & OdbcTypeInfo ) -> bool {
243- matches ! ( ty. data_type( ) , DataType :: Timestamp { .. } ) || ty. data_type ( ) . accepts_character_data ( )
247+ matches ! ( ty. data_type( ) , DataType :: Timestamp { .. } )
248+ || ty. data_type ( ) . accepts_character_data ( )
244249 }
245250 }
246251
@@ -249,7 +254,8 @@ mod chrono_types {
249254 OdbcTypeInfo :: TIMESTAMP
250255 }
251256 fn compatible ( ty : & OdbcTypeInfo ) -> bool {
252- matches ! ( ty. data_type( ) , DataType :: Timestamp { .. } ) || ty. data_type ( ) . accepts_character_data ( )
257+ matches ! ( ty. data_type( ) , DataType :: Timestamp { .. } )
258+ || ty. data_type ( ) . accepts_character_data ( )
253259 }
254260 }
255261}
@@ -281,7 +287,10 @@ mod bigdecimal_types {
281287 fn compatible ( ty : & OdbcTypeInfo ) -> bool {
282288 matches ! (
283289 ty. data_type( ) ,
284- DataType :: Numeric { .. } | DataType :: Decimal { .. } | DataType :: Double | DataType :: Float { .. }
290+ DataType :: Numeric { .. }
291+ | DataType :: Decimal { .. }
292+ | DataType :: Double
293+ | DataType :: Float { .. }
285294 ) || ty. data_type ( ) . accepts_character_data ( )
286295 }
287296 }
@@ -299,7 +308,10 @@ mod decimal_types {
299308 fn compatible ( ty : & OdbcTypeInfo ) -> bool {
300309 matches ! (
301310 ty. data_type( ) ,
302- DataType :: Numeric { .. } | DataType :: Decimal { .. } | DataType :: Double | DataType :: Float { .. }
311+ DataType :: Numeric { .. }
312+ | DataType :: Decimal { .. }
313+ | DataType :: Double
314+ | DataType :: Float { .. }
303315 ) || ty. data_type ( ) . accepts_character_data ( )
304316 }
305317 }
@@ -312,7 +324,8 @@ mod uuid_types {
312324
313325 impl Type < Odbc > for Uuid {
314326 fn type_info ( ) -> OdbcTypeInfo {
315- OdbcTypeInfo :: varchar ( Some ( std:: num:: NonZeroUsize :: new ( 36 ) . unwrap ( ) ) ) // UUID string length
327+ OdbcTypeInfo :: varchar ( Some ( std:: num:: NonZeroUsize :: new ( 36 ) . unwrap ( ) ) )
328+ // UUID string length
316329 }
317330 fn compatible ( ty : & OdbcTypeInfo ) -> bool {
318331 ty. data_type ( ) . accepts_character_data ( ) || ty. data_type ( ) . accepts_binary_data ( )
0 commit comments