mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
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:
@@ -509,16 +509,13 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
||||
return Ok(ProcessResult::Successful);
|
||||
}
|
||||
|
||||
let batch = match self.batches.get_mut(&batch_id) {
|
||||
Some(batch) => batch,
|
||||
None => {
|
||||
return self
|
||||
.fail_sync(BackFillError::InvalidSyncState(format!(
|
||||
"Trying to process a batch that does not exist: {}",
|
||||
batch_id
|
||||
)))
|
||||
.map(|_| ProcessResult::Successful);
|
||||
}
|
||||
let Some(batch) = self.batches.get_mut(&batch_id) else {
|
||||
return self
|
||||
.fail_sync(BackFillError::InvalidSyncState(format!(
|
||||
"Trying to process a batch that does not exist: {}",
|
||||
batch_id
|
||||
)))
|
||||
.map(|_| ProcessResult::Successful);
|
||||
};
|
||||
|
||||
// NOTE: We send empty batches to the processor in order to trigger the block processor
|
||||
@@ -909,9 +906,8 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
||||
network: &mut SyncNetworkContext<T>,
|
||||
batch_id: BatchId,
|
||||
) -> Result<(), BackFillError> {
|
||||
let batch = match self.batches.get_mut(&batch_id) {
|
||||
Some(batch) => batch,
|
||||
None => return Ok(()),
|
||||
let Some(batch) = self.batches.get_mut(&batch_id) else {
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
// Find a peer to request the batch
|
||||
|
||||
Reference in New Issue
Block a user