@@ -37,11 +37,10 @@ fn milestone_3() {
3737 println ! ( "{}" , & labeled_stdout) ;
3838
3939 let balance = get ( & labeled_stdout, "balance" ) . unwrap ( ) ;
40- assert_eq ! ( 1000 , u64 :: from_str_radix ( balance , 10 ) . unwrap( ) ) ;
40+ assert_eq ! ( 1000 , balance . parse :: < u64 > ( ) . unwrap( ) ) ;
4141
4242 let codehash = get ( & labeled_stdout, "codehash" )
43- . map ( |s| s. strip_prefix ( "0x" ) )
44- . flatten ( )
43+ . and_then ( |s| s. strip_prefix ( "0x" ) )
4544 . unwrap ( ) ;
4645
4746 let stdout = call ( dir, & address, [ "getCode()" ] ) . unwrap ( ) ;
@@ -59,8 +58,8 @@ fn milestone_3() {
5958 let i = gasprice
6059 . bytes ( )
6160 . position ( |c| c. is_ascii_whitespace ( ) )
62- . unwrap_or_else ( || gasprice. len ( ) ) ;
63- assert_eq ! ( 100000000 , u64 :: from_str_radix ( & gasprice[ ..i] , 10 ) . unwrap( ) ) ;
61+ . unwrap_or ( gasprice. len ( ) ) ;
62+ assert_eq ! ( 100_000_000 , gasprice[ ..i] . parse :: < u64 > ( ) . unwrap( ) ) ;
6463
6564 call ( dir, & address, [ "test_addmod()" ] ) . unwrap ( ) ;
6665
@@ -73,6 +72,7 @@ fn milestone_3() {
7372 call ( dir, & address, [ "test_power()" ] ) . unwrap ( ) ;
7473}
7574
75+ #[ allow( clippy:: format_collect) ]
7676fn label ( stdout : & str ) -> String {
7777 const LABELS : & [ & str ] = & [ "balance" , "codehash" , "manual_codehash" , "gasprice" ] ;
7878 let lines = stdout. lines ( ) . collect :: < Vec < _ > > ( ) ;
0 commit comments