mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 18:21:45 +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:
@@ -525,9 +525,7 @@ impl DoppelgangerService {
|
||||
}
|
||||
|
||||
// Resolve the index from the server response back to a public key.
|
||||
let pubkey = if let Some(pubkey) = indices_map.get(&response.index) {
|
||||
pubkey
|
||||
} else {
|
||||
let Some(pubkey) = indices_map.get(&response.index) else {
|
||||
crit!(
|
||||
self.log,
|
||||
"Inconsistent indices map";
|
||||
|
||||
@@ -607,9 +607,7 @@ pub async fn fill_in_aggregation_proofs<T: SlotClock + 'static, E: EthSpec>(
|
||||
|
||||
// Add to global storage (we add regularly so the proofs can be used ASAP).
|
||||
let sync_map = duties_service.sync_duties.committees.read();
|
||||
let committee_duties = if let Some(duties) = sync_map.get(&sync_committee_period) {
|
||||
duties
|
||||
} else {
|
||||
let Some(committee_duties) = sync_map.get(&sync_committee_period) else {
|
||||
debug!(
|
||||
log,
|
||||
"Missing sync duties";
|
||||
|
||||
@@ -158,13 +158,11 @@ impl<T: SlotClock + 'static, E: EthSpec> SyncCommitteeService<T, E> {
|
||||
.checked_sub(slot_duration / 3)
|
||||
.unwrap_or_else(|| Duration::from_secs(0));
|
||||
|
||||
let slot_duties = if let Some(duties) = self
|
||||
let Some(slot_duties) = self
|
||||
.duties_service
|
||||
.sync_duties
|
||||
.get_duties_for_slot::<E>(slot, &self.duties_service.spec)
|
||||
{
|
||||
duties
|
||||
} else {
|
||||
else {
|
||||
debug!(log, "No duties known for slot {}", slot);
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user