clippy: add cloned_instead_of_copied clippy lint (#10530)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Oliver <onbjerg@users.noreply.github.com>
This commit is contained in:
Thomas Coratger
2024-08-26 02:04:19 -07:00
committed by GitHub
parent 042faacb15
commit 29058ad7ee
13 changed files with 17 additions and 16 deletions

View File

@ -53,7 +53,7 @@ impl AccountReader for StateProviderTest {
impl BlockHashReader for StateProviderTest {
fn block_hash(&self, number: u64) -> ProviderResult<Option<B256>> {
Ok(self.block_hash.get(&number).cloned())
Ok(self.block_hash.get(&number).copied())
}
fn canonical_hashes_range(
@ -134,7 +134,7 @@ impl StateProvider for StateProviderTest {
account: Address,
storage_key: StorageKey,
) -> ProviderResult<Option<reth_primitives::StorageValue>> {
Ok(self.accounts.get(&account).and_then(|(storage, _)| storage.get(&storage_key).cloned()))
Ok(self.accounts.get(&account).and_then(|(storage, _)| storage.get(&storage_key).copied()))
}
fn bytecode_by_hash(&self, code_hash: B256) -> ProviderResult<Option<Bytecode>> {