chore: replace match with let else (#13585)

This commit is contained in:
Matthias Seitz
2024-12-28 19:44:54 +01:00
committed by GitHub
parent ad89056e48
commit 711c5e812e

View File

@ -218,9 +218,8 @@ where
limit: usize,
) -> EthResult<Option<(B256, Vec<U256>)>> {
// check the cache (this will hit the disk if the block is not cached)
let block = match self.cache.get_sealed_block_with_senders(block_hash).await? {
Some(block) => block,
None => return Ok(None),
let Some(block) = self.cache.get_sealed_block_with_senders(block_hash).await? else {
return Ok(None)
};
let base_fee_per_gas = block.base_fee_per_gas();