File tree Expand file tree Collapse file tree
runtime/wasm/src/rust_abi Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -386,8 +386,13 @@ mod tests {
386386 let len = u32:: from_le_bytes ( bytes[ 1 ..5 ] . try_into ( ) . unwrap ( ) ) as usize ;
387387 let s = std:: str:: from_utf8 ( & bytes[ 5 ..5 + len] ) . unwrap ( ) ;
388388 // must be a valid decimal string representation
389- assert ! ( s. contains( '.' ) || s. chars( ) . all( |c| c. is_ascii_digit( ) || c == '-' || c == 'E' || c == 'e' ) ,
390- "expected decimal string, got: {}" , s) ;
389+ assert ! (
390+ s. contains( '.' )
391+ || s. chars( )
392+ . all( |c| c. is_ascii_digit( ) || c == '-' || c == 'E' || c == 'e' ) ,
393+ "expected decimal string, got: {}" ,
394+ s
395+ ) ;
391396 }
392397
393398 #[ test]
@@ -501,7 +506,10 @@ mod tests {
501506 assert_eq ! ( count, 3 ) ;
502507
503508 let recovered = EntityData :: from_bytes ( & bytes) . unwrap ( ) ;
504- assert_eq ! ( recovered. get( "id" ) , Some ( & Value :: String ( "tx-1" . to_string( ) ) ) ) ;
509+ assert_eq ! (
510+ recovered. get( "id" ) ,
511+ Some ( & Value :: String ( "tx-1" . to_string( ) ) )
512+ ) ;
505513 assert_eq ! ( recovered. get( "value" ) , Some ( & Value :: Int ( 42 ) ) ) ;
506514 assert_eq ! ( recovered. get( "active" ) , Some ( & Value :: Bool ( true ) ) ) ;
507515 }
You can’t perform that action at this time.
0 commit comments