Skip to content

Commit

Permalink
chore: replace match with let else (#13585)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Dec 28, 2024
1 parent ad89056 commit 711c5e8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/rpc/rpc-eth-types/src/gas_oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 711c5e8

Please sign in to comment.