@@ -285,20 +285,24 @@ mod tests {
285285 decimal4_too_large. is_err( ) ,
286286 "Decimal4 precision overflow should fail"
287287 ) ;
288- assert ! ( decimal4_too_large
289- . unwrap_err( )
290- . to_string( )
291- . contains( "wider than max precision" ) ) ;
288+ assert ! (
289+ decimal4_too_large
290+ . unwrap_err( )
291+ . to_string( )
292+ . contains( "wider than max precision" )
293+ ) ;
292294
293295 let decimal4_too_small = VariantDecimal4 :: try_new ( -1_000_000_000_i32 , 2 ) ;
294296 assert ! (
295297 decimal4_too_small. is_err( ) ,
296298 "Decimal4 precision underflow should fail"
297299 ) ;
298- assert ! ( decimal4_too_small
299- . unwrap_err( )
300- . to_string( )
301- . contains( "wider than max precision" ) ) ;
300+ assert ! (
301+ decimal4_too_small
302+ . unwrap_err( )
303+ . to_string( )
304+ . contains( "wider than max precision" )
305+ ) ;
302306
303307 // Test valid edge cases for Decimal4
304308 let decimal4_max_valid = VariantDecimal4 :: try_new ( 999_999_999_i32 , 2 ) ;
@@ -319,20 +323,24 @@ mod tests {
319323 decimal8_too_large. is_err( ) ,
320324 "Decimal8 precision overflow should fail"
321325 ) ;
322- assert ! ( decimal8_too_large
323- . unwrap_err( )
324- . to_string( )
325- . contains( "wider than max precision" ) ) ;
326+ assert ! (
327+ decimal8_too_large
328+ . unwrap_err( )
329+ . to_string( )
330+ . contains( "wider than max precision" )
331+ ) ;
326332
327333 let decimal8_too_small = VariantDecimal8 :: try_new ( -1_000_000_000_000_000_000_i64 , 2 ) ;
328334 assert ! (
329335 decimal8_too_small. is_err( ) ,
330336 "Decimal8 precision underflow should fail"
331337 ) ;
332- assert ! ( decimal8_too_small
333- . unwrap_err( )
334- . to_string( )
335- . contains( "wider than max precision" ) ) ;
338+ assert ! (
339+ decimal8_too_small
340+ . unwrap_err( )
341+ . to_string( )
342+ . contains( "wider than max precision" )
343+ ) ;
336344
337345 // Test valid edge cases for Decimal8
338346 let decimal8_max_valid = VariantDecimal8 :: try_new ( 999_999_999_999_999_999_i64 , 2 ) ;
@@ -354,21 +362,25 @@ mod tests {
354362 decimal16_too_large. is_err( ) ,
355363 "Decimal16 precision overflow should fail"
356364 ) ;
357- assert ! ( decimal16_too_large
358- . unwrap_err( )
359- . to_string( )
360- . contains( "wider than max precision" ) ) ;
365+ assert ! (
366+ decimal16_too_large
367+ . unwrap_err( )
368+ . to_string( )
369+ . contains( "wider than max precision" )
370+ ) ;
361371
362372 let decimal16_too_small =
363373 VariantDecimal16 :: try_new ( -100000000000000000000000000000000000000_i128 , 2 ) ;
364374 assert ! (
365375 decimal16_too_small. is_err( ) ,
366376 "Decimal16 precision underflow should fail"
367377 ) ;
368- assert ! ( decimal16_too_small
369- . unwrap_err( )
370- . to_string( )
371- . contains( "wider than max precision" ) ) ;
378+ assert ! (
379+ decimal16_too_small
380+ . unwrap_err( )
381+ . to_string( )
382+ . contains( "wider than max precision" )
383+ ) ;
372384
373385 // Test valid edge cases for Decimal16
374386 let decimal16_max_valid =
@@ -394,10 +406,12 @@ mod tests {
394406 decimal4_invalid_scale. is_err( ) ,
395407 "Decimal4 with scale > 9 should fail"
396408 ) ;
397- assert ! ( decimal4_invalid_scale
398- . unwrap_err( )
399- . to_string( )
400- . contains( "larger than max precision" ) ) ;
409+ assert ! (
410+ decimal4_invalid_scale
411+ . unwrap_err( )
412+ . to_string( )
413+ . contains( "larger than max precision" )
414+ ) ;
401415
402416 let decimal4_invalid_scale_large = VariantDecimal4 :: try_new ( 123_i32 , 20 ) ;
403417 assert ! (
@@ -418,10 +432,12 @@ mod tests {
418432 decimal8_invalid_scale. is_err( ) ,
419433 "Decimal8 with scale > 18 should fail"
420434 ) ;
421- assert ! ( decimal8_invalid_scale
422- . unwrap_err( )
423- . to_string( )
424- . contains( "larger than max precision" ) ) ;
435+ assert ! (
436+ decimal8_invalid_scale
437+ . unwrap_err( )
438+ . to_string( )
439+ . contains( "larger than max precision" )
440+ ) ;
425441
426442 let decimal8_invalid_scale_large = VariantDecimal8 :: try_new ( 123_i64 , 25 ) ;
427443 assert ! (
@@ -442,10 +458,12 @@ mod tests {
442458 decimal16_invalid_scale. is_err( ) ,
443459 "Decimal16 with scale > 38 should fail"
444460 ) ;
445- assert ! ( decimal16_invalid_scale
446- . unwrap_err( )
447- . to_string( )
448- . contains( "larger than max precision" ) ) ;
461+ assert ! (
462+ decimal16_invalid_scale
463+ . unwrap_err( )
464+ . to_string( )
465+ . contains( "larger than max precision" )
466+ ) ;
449467
450468 let decimal16_invalid_scale_large = VariantDecimal16 :: try_new ( 123_i128 , 50 ) ;
451469 assert ! (
0 commit comments