Activate clippy::manual_let_else lint (#4889)

## Issue Addressed

#4888

## Proposed Changes

Enabled `clippy::manual_let_else` lint and resolved the warning messages.
This commit is contained in:
Eitan Seri-Levi
2023-10-31 10:31:02 +00:00
parent a9f9dc241d
commit 4ce01ddd11
35 changed files with 185 additions and 286 deletions

View File

@@ -451,23 +451,21 @@ async fn availability_cache_maintenance_service<T: BeaconChainTypes>(
let additional_delay = (epoch_duration * 3) / 4;
tokio::time::sleep(duration + additional_delay).await;
let deneb_fork_epoch = match chain.spec.deneb_fork_epoch {
Some(epoch) => epoch,
None => break, // shutdown service if deneb fork epoch not set
let Some(deneb_fork_epoch) = chain.spec.deneb_fork_epoch else {
// shutdown service if deneb fork epoch not set
break;
};
debug!(
chain.log,
"Availability cache maintenance service firing";
);
let current_epoch = match chain
let Some(current_epoch) = chain
.slot_clock
.now()
.map(|slot| slot.epoch(T::EthSpec::slots_per_epoch()))
{
Some(epoch) => epoch,
None => continue, // we'll have to try again next time I suppose..
else {
continue;
};
if current_epoch < deneb_fork_epoch {