Skip to content

Commit

Permalink
chore: remove useless Arc::clone
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwener committed Jul 16, 2024
1 parent 1849d7c commit a84c009
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/fork_ref_transact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async fn main() -> anyhow::Result<()> {
let encoded = getReservesCall::new(()).abi_encode();

// initialize new EthersDB
let mut ethersdb = EthersDB::new(Arc::clone(&client), None).unwrap();
let mut ethersdb = EthersDB::new(client, None).unwrap();

// query basic properties of an account incl bytecode
let acc_info = ethersdb.basic(pool_address).unwrap().unwrap();
Expand Down Expand Up @@ -89,7 +89,7 @@ async fn main() -> anyhow::Result<()> {
output: Output::Call(value),
..
} => value,
result => panic!("Execution failed: {result:?}"),
_ => panic!("Execution failed: {result:?}"),
};

// decode bytes to reserves + ts via alloy's abi decode
Expand Down
2 changes: 1 addition & 1 deletion examples/generate_block_traces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async fn main() -> anyhow::Result<()> {
// Use the previous block state as the db with caching
let prev_id: BlockId = previous_block_number.into();
// SAFETY: This cannot fail since this is in the top-level tokio runtime
let state_db = EthersDB::new(Arc::clone(&client), Some(prev_id)).expect("panic");
let state_db = EthersDB::new(client, Some(prev_id)).expect("panic");
let cache_db: CacheDB<EthersDB<Provider<Http>>> = CacheDB::new(state_db);
let mut state = StateBuilder::new_with_database(cache_db).build();
let mut evm = Evm::builder()
Expand Down

0 comments on commit a84c009

Please sign in to comment.