mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-02 12:24:29 +00:00
Rust 1.85 lints (#7019)
N/A 2 changes: 1. Replace Option::map_or(true, ...) with is_none_or(...) 2. Remove unnecessary `Into::into` blocks where the type conversion is apparent from the types
This commit is contained in:
@@ -6506,9 +6506,9 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
|
||||
/// Returns `true` if the given slot is prior to the `bellatrix_fork_epoch`.
|
||||
pub fn slot_is_prior_to_bellatrix(&self, slot: Slot) -> bool {
|
||||
self.spec.bellatrix_fork_epoch.map_or(true, |bellatrix| {
|
||||
slot.epoch(T::EthSpec::slots_per_epoch()) < bellatrix
|
||||
})
|
||||
self.spec
|
||||
.bellatrix_fork_epoch
|
||||
.is_none_or(|bellatrix| slot.epoch(T::EthSpec::slots_per_epoch()) < bellatrix)
|
||||
}
|
||||
|
||||
/// Returns the value of `execution_optimistic` for `block`.
|
||||
|
||||
Reference in New Issue
Block a user