mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +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:
@@ -1015,15 +1015,12 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
||||
BlockProcessingResult::Ok(AvailabilityProcessingStatus::Imported(_))
|
||||
| BlockProcessingResult::Err(BlockError::BlockIsAlreadyKnown { .. }) => {
|
||||
// Check if the beacon processor is available
|
||||
let beacon_processor = match cx.beacon_processor_if_enabled() {
|
||||
Some(beacon_processor) => beacon_processor,
|
||||
None => {
|
||||
return trace!(
|
||||
self.log,
|
||||
"Dropping parent chain segment that was ready for processing.";
|
||||
parent_lookup
|
||||
);
|
||||
}
|
||||
let Some(beacon_processor) = cx.beacon_processor_if_enabled() else {
|
||||
return trace!(
|
||||
self.log,
|
||||
"Dropping parent chain segment that was ready for processing.";
|
||||
parent_lookup
|
||||
);
|
||||
};
|
||||
let (chain_hash, blocks, hashes, block_request) =
|
||||
parent_lookup.parts_for_processing();
|
||||
@@ -1195,11 +1192,8 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
||||
result: BatchProcessResult,
|
||||
cx: &SyncNetworkContext<T>,
|
||||
) {
|
||||
let request = match self.processing_parent_lookups.remove(&chain_hash) {
|
||||
Some((_hashes, request)) => request,
|
||||
None => {
|
||||
return debug!(self.log, "Chain process response for a parent lookup request that was not found"; "chain_hash" => %chain_hash, "result" => ?result)
|
||||
}
|
||||
let Some((_hashes, request)) = self.processing_parent_lookups.remove(&chain_hash) else {
|
||||
return debug!(self.log, "Chain process response for a parent lookup request that was not found"; "chain_hash" => %chain_hash, "result" => ?result);
|
||||
};
|
||||
|
||||
debug!(self.log, "Parent chain processed"; "chain_hash" => %chain_hash, "result" => ?result);
|
||||
|
||||
Reference in New Issue
Block a user