mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-30 19:23:50 +00:00
Rust 1.84 lints (#6781)
* Fix few lints * Fix remaining lints * Use fully qualified syntax
This commit is contained in:
@@ -162,7 +162,7 @@ impl DoppelgangerState {
|
||||
/// If the BN fails to respond to either of these requests, simply return an empty response.
|
||||
/// This behaviour is to help prevent spurious failures on the BN from needlessly preventing
|
||||
/// doppelganger progression.
|
||||
async fn beacon_node_liveness<'a, T: 'static + SlotClock, E: EthSpec>(
|
||||
async fn beacon_node_liveness<T: 'static + SlotClock, E: EthSpec>(
|
||||
beacon_nodes: Arc<BeaconNodeFallback<T, E>>,
|
||||
log: Logger,
|
||||
current_epoch: Epoch,
|
||||
|
||||
@@ -1113,9 +1113,7 @@ fn max_or<T: Copy + Ord>(opt_x: Option<T>, y: T) -> T {
|
||||
///
|
||||
/// If prev is `None` and `new` is `Some` then `true` is returned.
|
||||
fn monotonic<T: PartialOrd>(new: Option<T>, prev: Option<T>) -> bool {
|
||||
new.map_or(false, |new_val| {
|
||||
prev.map_or(true, |prev_val| new_val >= prev_val)
|
||||
})
|
||||
new.is_some_and(|new_val| prev.map_or(true, |prev_val| new_val >= prev_val))
|
||||
}
|
||||
|
||||
/// The result of importing a single entry from an interchange file.
|
||||
|
||||
@@ -258,7 +258,7 @@ impl<T: SlotClock + 'static, E: EthSpec> PreparationService<T, E> {
|
||||
.slot_clock
|
||||
.now()
|
||||
.map_or(E::genesis_epoch(), |slot| slot.epoch(E::slots_per_epoch()));
|
||||
spec.bellatrix_fork_epoch.map_or(false, |fork_epoch| {
|
||||
spec.bellatrix_fork_epoch.is_some_and(|fork_epoch| {
|
||||
current_epoch + PROPOSER_PREPARATION_LOOKAHEAD_EPOCHS >= fork_epoch
|
||||
})
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ impl<E: EthSpec> SyncDutiesMap<E> {
|
||||
self.committees
|
||||
.read()
|
||||
.get(&committee_period)
|
||||
.map_or(false, |committee_duties| {
|
||||
.is_some_and(|committee_duties| {
|
||||
let validator_duties = committee_duties.validators.read();
|
||||
validator_indices
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user