mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Rust 1.84 lints (#6781)
* Fix few lints * Fix remaining lints * Use fully qualified syntax
This commit is contained in:
@@ -1164,7 +1164,7 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
.map_err(warp_utils::reject::beacon_chain_error)?
|
||||
// Ignore any skip-slots immediately following the parent.
|
||||
.find(|res| {
|
||||
res.as_ref().map_or(false, |(root, _)| *root != parent_root)
|
||||
res.as_ref().is_ok_and(|(root, _)| *root != parent_root)
|
||||
})
|
||||
.transpose()
|
||||
.map_err(warp_utils::reject::beacon_chain_error)?
|
||||
@@ -1249,7 +1249,7 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
let canonical = chain
|
||||
.block_root_at_slot(block.slot(), WhenSlotSkipped::None)
|
||||
.map_err(warp_utils::reject::beacon_chain_error)?
|
||||
.map_or(false, |canonical| root == canonical);
|
||||
.is_some_and(|canonical| root == canonical);
|
||||
|
||||
let data = api_types::BlockHeaderData {
|
||||
root,
|
||||
|
||||
@@ -14,7 +14,7 @@ pub fn pubkey_to_validator_index<T: BeaconChainTypes>(
|
||||
state
|
||||
.validators()
|
||||
.get(index)
|
||||
.map_or(false, |v| v.pubkey == *pubkey)
|
||||
.is_some_and(|v| v.pubkey == *pubkey)
|
||||
})
|
||||
.map(Result::Ok)
|
||||
.transpose()
|
||||
|
||||
Reference in New Issue
Block a user