From f5d6de1f03dceaeac6097dcb440a4d0a148505bf Mon Sep 17 00:00:00 2001 From: Enrique Ortiz Date: Thu, 1 Feb 2024 17:18:37 -0400 Subject: [PATCH 1/2] chore: remove unneeded to_vec conversion --- crates/anvil/src/eth/backend/genesis.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/anvil/src/eth/backend/genesis.rs b/crates/anvil/src/eth/backend/genesis.rs index c6e75bb4440f..b9c0445f2502 100644 --- a/crates/anvil/src/eth/backend/genesis.rs +++ b/crates/anvil/src/eth/backend/genesis.rs @@ -71,7 +71,7 @@ impl GenesisConfig { /// Converts a [`GenesisAccount`] to an [`AccountInfo`] fn genesis_to_account_info(&self, acc: &GenesisAccount) -> AccountInfo { let GenesisAccount { code, balance, nonce, .. } = acc.clone(); - let code = code.map(|code| Bytecode::new_raw(code.to_vec().into())); + let code = code.map(|code| Bytecode::new_raw(code)); AccountInfo { balance, nonce: nonce.unwrap_or_default(), From 302a7bb66cd8d2330ea9ab349bc5a5c529941154 Mon Sep 17 00:00:00 2001 From: Enrique Ortiz Date: Thu, 1 Feb 2024 17:23:33 -0400 Subject: [PATCH 2/2] clippy --- crates/anvil/src/eth/backend/genesis.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/anvil/src/eth/backend/genesis.rs b/crates/anvil/src/eth/backend/genesis.rs index b9c0445f2502..14197b63d9ba 100644 --- a/crates/anvil/src/eth/backend/genesis.rs +++ b/crates/anvil/src/eth/backend/genesis.rs @@ -71,7 +71,7 @@ impl GenesisConfig { /// Converts a [`GenesisAccount`] to an [`AccountInfo`] fn genesis_to_account_info(&self, acc: &GenesisAccount) -> AccountInfo { let GenesisAccount { code, balance, nonce, .. } = acc.clone(); - let code = code.map(|code| Bytecode::new_raw(code)); + let code = code.map(Bytecode::new_raw); AccountInfo { balance, nonce: nonce.unwrap_or_default(),