chore: make clippy happy (#12594)

This commit is contained in:
Matthias Seitz
2024-11-16 06:04:39 +01:00
committed by GitHub
parent 2dc9a06321
commit fc97a0cbaf
24 changed files with 54 additions and 56 deletions

View File

@ -47,19 +47,19 @@ impl ForkchoiceStateTracker {
/// Returns whether the latest received FCU is valid: [`ForkchoiceStatus::Valid`]
#[allow(dead_code)]
pub(crate) fn is_latest_valid(&self) -> bool {
self.latest_status().map_or(false, |s| s.is_valid())
self.latest_status().is_some_and(|s| s.is_valid())
}
/// Returns whether the latest received FCU is syncing: [`ForkchoiceStatus::Syncing`]
#[allow(dead_code)]
pub(crate) fn is_latest_syncing(&self) -> bool {
self.latest_status().map_or(false, |s| s.is_syncing())
self.latest_status().is_some_and(|s| s.is_syncing())
}
/// Returns whether the latest received FCU is syncing: [`ForkchoiceStatus::Invalid`]
#[allow(dead_code)]
pub fn is_latest_invalid(&self) -> bool {
self.latest_status().map_or(false, |s| s.is_invalid())
self.latest_status().is_some_and(|s| s.is_invalid())
}
/// Returns the last valid head hash.