diff --git a/contracts/foundry/foundrylike/src/test_adder.rs b/contracts/foundry/foundrylike/src/test_adder.rs index 48cfb1b82d..499a07aacc 100644 --- a/contracts/foundry/foundrylike/src/test_adder.rs +++ b/contracts/foundry/foundrylike/src/test_adder.rs @@ -89,7 +89,7 @@ pub trait TestAdder { let adder = self.adder_address().get(); let mut adder_init_args = ManagedArgBuffer::new(); - adder_init_args.push_arg(&value); // initial sum + adder_init_args.push_arg(value); // initial sum // start a prank and call 'adder' from 'owner' self.test_raw().start_prank(&owner); @@ -102,9 +102,8 @@ pub trait TestAdder { ); self.test_raw().stop_prank(); - match res { - Result::Err(_) => panic!("call failed"), - Result::Ok(_) => (), - }; + if res.is_err() { + panic!("call failed"); + } } } diff --git a/contracts/foundry/test_multisig/src/test_multisig.rs b/contracts/foundry/test_multisig/src/test_multisig.rs index 0baf5eb0c8..87f58e22fe 100644 --- a/contracts/foundry/test_multisig/src/test_multisig.rs +++ b/contracts/foundry/test_multisig/src/test_multisig.rs @@ -54,14 +54,14 @@ pub trait TestMultisigContract { fn get_quorum(&self, multisig: &ManagedAddress) -> BigUint { let bs = self .test_raw() - .get_storage(&multisig, &ManagedBuffer::from(b"quorum")); + .get_storage(multisig, &ManagedBuffer::from(b"quorum")); BigUint::from(bs) } fn get_num_board_members(&self, multisig: &ManagedAddress) -> BigUint { let bs = self .test_raw() - .get_storage(&multisig, &ManagedBuffer::from(b"num_board_members")); + .get_storage(multisig, &ManagedBuffer::from(b"num_board_members")); BigUint::from(bs) } @@ -92,9 +92,9 @@ pub trait TestMultisigContract { let mut args = ManagedArgBuffer::new(); args.push_arg(value); - self.test_raw().start_prank(&proposer); + self.test_raw().start_prank(proposer); let _ = self.send_raw().direct_egld_execute( - &multisig, + multisig, &BigUint::from(0u32), 5000000, &ManagedBuffer::from(b"proposeChangeQuorum"), @@ -109,7 +109,7 @@ pub trait TestMultisigContract { self.test_raw().start_prank(signer); let _ = self.send_raw().direct_egld_execute( - &multisig, + multisig, &BigUint::from(0u32), 5000000, &ManagedBuffer::from(b"sign"), @@ -124,7 +124,7 @@ pub trait TestMultisigContract { self.test_raw().start_prank(performer); let _ = self.send_raw().direct_egld_execute( - &multisig, + multisig, &BigUint::from(0u32), 5000000, &ManagedBuffer::from(b"performAction"), diff --git a/vm/src/mem_conv.rs b/vm/src/mem_conv.rs index d292dfbd10..eb8c46de59 100644 --- a/vm/src/mem_conv.rs +++ b/vm/src/mem_conv.rs @@ -7,7 +7,6 @@ where f(bytes.as_ptr() as MemPtr, bytes.len() as MemLength) } -#[allow(clippy::needless_pass_by_ref_mut)] pub fn with_mem_ptr_mut(bytes: &mut [u8], f: F) -> R where F: FnOnce(MemPtr, MemLength) -> R,