Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
codyx committed Jan 31, 2025
1 parent 6971453 commit 0a5af70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/fetcher/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ impl<'a> Fetcher<'a> {
let mut tx_receipts_mpt_handlers: HashMap<u64, Box<TxReceiptsMptHandler>> = HashMap::default();

for key in self.proof_keys.evm.receipt_keys.iter() {
if !tx_receipts_mpt_handlers.contains_key(&key.block_number) {
if let std::collections::hash_map::Entry::Vacant(e) = tx_receipts_mpt_handlers.entry(key.block_number) {
let tx_receipts_mpt_handler = TxReceiptsMptHandler::new(Url::parse(&env::var(RPC_URL_ETHEREUM).unwrap()).unwrap())
.map_err(|e| FetcherError::InternalError(e.to_string()))?;

Expand All @@ -240,7 +240,7 @@ impl<'a> Fetcher<'a> {
.await
.map_err(|e| FetcherError::InternalError(e.to_string()))?;

tx_receipts_mpt_handlers.insert(key.block_number, boxed_handler);
e.insert(boxed_handler);
}
}

Expand Down Expand Up @@ -277,7 +277,7 @@ impl<'a> Fetcher<'a> {
let mut tx_trie_handlers: HashMap<u64, Box<TxsMptHandler>> = HashMap::default();

for key in self.proof_keys.evm.transaction_keys.iter() {
if !tx_trie_handlers.contains_key(&key.block_number) {
if let std::collections::hash_map::Entry::Vacant(e) = tx_trie_handlers.entry(key.block_number) {
let tx_trie_handler = TxsMptHandler::new(Url::parse(&env::var(RPC_URL_ETHEREUM).unwrap()).unwrap())
.map_err(|e| FetcherError::InternalError(e.to_string()))?;

Expand All @@ -288,7 +288,7 @@ impl<'a> Fetcher<'a> {
.await
.map_err(|e| FetcherError::InternalError(e.to_string()))?;

tx_trie_handlers.insert(key.block_number, boxed_handler);
e.insert(boxed_handler);
}
}

Expand Down

0 comments on commit 0a5af70

Please sign in to comment.