@@ -544,7 +544,7 @@ mod account_conversion {
544544 . pre_dispatch ( & account, & call, & info, len) ;
545545 assert_ok ! ( & pre) ;
546546
547- let result = call. clone ( ) . dispatch ( RuntimeOrigin :: signed ( account. clone ( ) . into ( ) ) ) ;
547+ let result = call. clone ( ) . dispatch ( RuntimeOrigin :: signed ( account. clone ( ) ) ) ;
548548 assert_ok ! ( result) ;
549549
550550 assert_ok ! (
@@ -1249,7 +1249,7 @@ mod currency_precompile {
12491249 } )
12501250 ) ;
12511251
1252- let stored = pallet_evm_accounts:: Pallet :: < Runtime > :: get_allowance ( HDX . into ( ) , owner, spender) ;
1252+ let stored = pallet_evm_accounts:: Pallet :: < Runtime > :: get_allowance ( HDX , owner, spender) ;
12531253 assert_eq ! ( stored, amount) ;
12541254 } ) ;
12551255 }
@@ -1339,13 +1339,13 @@ mod currency_precompile {
13391339
13401340 approve ( 80u128 * UNITS ) ;
13411341 assert_eq ! (
1342- pallet_evm_accounts:: Pallet :: <Runtime >:: get_allowance( HDX . into ( ) , owner, spender) ,
1342+ pallet_evm_accounts:: Pallet :: <Runtime >:: get_allowance( HDX , owner, spender) ,
13431343 80u128 * UNITS
13441344 ) ;
13451345
13461346 approve ( 0 ) ;
13471347 assert_eq ! (
1348- pallet_evm_accounts:: Pallet :: <Runtime >:: get_allowance( HDX . into ( ) , owner, spender) ,
1348+ pallet_evm_accounts:: Pallet :: <Runtime >:: get_allowance( HDX , owner, spender) ,
13491349 0
13501350 ) ;
13511351 } ) ;
@@ -2864,7 +2864,7 @@ mod account_marking {
28642864 10000 * UNITS as i128 ,
28652865 ) ) ;
28662866
2867- let state = frame_system:: Pallet :: < Runtime > :: account ( & user_acc. address ( ) ) ;
2867+ let state = frame_system:: Pallet :: < Runtime > :: account ( user_acc. address ( ) ) ;
28682868 assert_eq ! ( state. providers, 1 ) ;
28692869 assert_eq ! ( state. sufficients, 0 ) ;
28702870 assert_eq ! ( state. nonce, 0 ) ;
@@ -2914,7 +2914,7 @@ mod account_marking {
29142914 ) ) ;
29152915
29162916 // Verify the nonce and sufficients were incremented through EVM transactions
2917- let state = frame_system:: Pallet :: < Runtime > :: account ( & user_acc. address ( ) ) ;
2917+ let state = frame_system:: Pallet :: < Runtime > :: account ( user_acc. address ( ) ) ;
29182918 assert_eq ! ( state. providers, 1 ) ;
29192919 assert_eq ! ( state. sufficients, 1 ) ;
29202920 assert_eq ! ( state. nonce, 3 , ) ;
@@ -2979,7 +2979,7 @@ mod account_marking {
29792979 initial_amount as i128 ,
29802980 ) ) ;
29812981
2982- let state = frame_system:: Pallet :: < Runtime > :: account ( & user_acc. address ( ) ) ;
2982+ let state = frame_system:: Pallet :: < Runtime > :: account ( user_acc. address ( ) ) ;
29832983 assert_eq ! ( state. providers, 1 ) ;
29842984
29852985 assert_ok ! ( Omnipool :: sell(
@@ -3042,7 +3042,7 @@ mod account_marking {
30423042 let free_hdx = Currencies :: free_balance ( HDX , & user_acc. address ( ) ) ;
30433043 assert_eq ! ( free_hdx, 0 ) ;
30443044
3045- let state = frame_system:: Pallet :: < Runtime > :: account ( & user_acc. address ( ) ) ;
3045+ let state = frame_system:: Pallet :: < Runtime > :: account ( user_acc. address ( ) ) ;
30463046 assert_eq ! ( state. providers, 0 ) ;
30473047 assert_eq ! ( state. sufficients, 1 ) ;
30483048 assert_eq ! ( state. nonce, 3 ) ;
@@ -3120,7 +3120,7 @@ mod account_marking {
31203120 initial_amount as i128 ,
31213121 ) ) ;
31223122
3123- let state = frame_system:: Pallet :: < Runtime > :: account ( & user_acc. address ( ) ) ;
3123+ let state = frame_system:: Pallet :: < Runtime > :: account ( user_acc. address ( ) ) ;
31243124 assert_eq ! ( state. providers, 1 ) ;
31253125
31263126 assert_ok ! ( Omnipool :: sell(
@@ -3185,7 +3185,7 @@ mod account_marking {
31853185 let free_hdx = Currencies :: free_balance ( HDX , & user_acc. address ( ) ) ;
31863186 assert ! ( free_hdx > 0 ) ;
31873187
3188- let state = frame_system:: Pallet :: < Runtime > :: account ( & user_acc. address ( ) ) ;
3188+ let state = frame_system:: Pallet :: < Runtime > :: account ( user_acc. address ( ) ) ;
31893189 assert_eq ! ( state. providers, 1 ) ;
31903190 assert_eq ! ( state. sufficients, 1 ) ;
31913191 assert_eq ! ( state. nonce, 0 ) ;
@@ -3915,7 +3915,7 @@ fn raw_eip1559_eth_call_with_params(is_batch: bool, nonce: U256, input: Vec<u8>)
39153915 gas_limit : gas_limit. into ( ) ,
39163916 action : TransactionAction :: Call ( DISPATCH_ADDR ) ,
39173917 value : U256 :: zero ( ) ,
3918- input : input_data. clone ( ) . into ( ) ,
3918+ input : input_data. clone ( ) ,
39193919 access_list : vec ! [ ] ,
39203920 } ;
39213921
@@ -3937,7 +3937,7 @@ fn raw_eip1559_eth_call_with_params(is_batch: bool, nonce: U256, input: Vec<u8>)
39373937 gas_limit : gas_limit. into ( ) ,
39383938 action : TransactionAction :: Call ( DISPATCH_ADDR ) ,
39393939 value : U256 :: zero ( ) ,
3940- input : input_data. into ( ) ,
3940+ input : input_data,
39413941 access_list : vec ! [ ] ,
39423942 odd_y_parity,
39433943 r : H256 :: from ( rs. r . b32 ( ) ) ,
@@ -4043,7 +4043,7 @@ fn raw_legacy_eth_call_with_params(is_batch: bool, nonce: U256, input: Vec<u8>)
40434043 gas_limit : gas_limit. into ( ) ,
40444044 action : TransactionAction :: Call ( DISPATCH_ADDR ) ,
40454045 value : U256 :: zero ( ) ,
4046- input : input_data. clone ( ) . into ( ) ,
4046+ input : input_data. clone ( ) ,
40474047 chain_id : None ,
40484048 } ;
40494049
@@ -4067,7 +4067,7 @@ fn raw_legacy_eth_call_with_params(is_batch: bool, nonce: U256, input: Vec<u8>)
40674067 gas_limit : gas_limit. into ( ) ,
40684068 action : TransactionAction :: Call ( DISPATCH_ADDR ) ,
40694069 value : U256 :: zero ( ) ,
4070- input : input_data. into ( ) ,
4070+ input : input_data,
40714071 signature,
40724072 } ;
40734073
@@ -4667,7 +4667,7 @@ mod evm_error_decoder {
46674667 ..Config :: default ( )
46684668 } ) ;
46694669
4670- let _ = runner
4670+ runner
46714671 . run ( & random_error_string ( ) , |value| {
46724672 let call_result = CallResult {
46734673 exit_reason : ExitReason :: Error ( ExitError :: Other ( "Some error" . into ( ) ) ) ,
@@ -5003,7 +5003,7 @@ mod evm_error_decoder {
50035003
50045004 #[ test]
50055005 fn test_scale_decode_malicious_payload ( ) {
5006- let malicious_payloads = vec ! [
5006+ let malicious_payloads = [
50075007 // Looks like Module error (discriminant 3) with crafted data
50085008 vec ! [ 0x03 , 0xFF , 0xFF , 0xFF , 0xFF , 0x00 , 0x00 , 0x00 , 0x00 ] ,
50095009 // Looks like Other variant (discriminant 0) with invalid string data
@@ -5026,7 +5026,7 @@ mod evm_error_decoder {
50265026 }
50275027
50285028 #[ test]
5029- fn dispatch_decode_with_malformed_scawle_payloads_should_not_panic ( ) {
5029+ fn dispatch_decode_with_malformed_scale_payloads_should_not_panic ( ) {
50305030 // Test various malicious/malformed SCALE-encoded payloads
50315031 // that could trigger panics in decode_with_depth_limit
50325032 let test_cases = vec ! [
@@ -5062,12 +5062,12 @@ mod evm_error_decoder {
50625062 } ;
50635063
50645064 let _result = EvmErrorDecoder :: convert ( call_result. clone ( ) ) ;
5065- DispatchError :: decode_with_depth_limit ( MAX_DECODE_DEPTH , & mut & call_result. value [ ..] ) ;
5065+ let _ = DispatchError :: decode_with_depth_limit ( MAX_DECODE_DEPTH , & mut & call_result. value [ ..] ) ;
50665066 }
50675067 }
50685068
50695069 #[ test]
5070- fn dispatch_decode_cannot_pani_for_different_multi_byte_patterns ( ) {
5070+ fn dispatch_decode_cannot_panic_for_different_multi_byte_patterns ( ) {
50715071 for byte1 in [ 0x00 , 0x03 , 0x06 , 0x07 , 0xFF ] . iter ( ) {
50725072 for byte2 in [ 0x00 , 0xFF ] . iter ( ) {
50735073 let call_result = CallResult {
0 commit comments