mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Update for clippy 1.50 (#2193)
## Issue Addressed NA ## Proposed Changes Rust 1.50 has landed 🎉 The shiny new `clippy` peers down upon us mere mortals with disgust. Brutish peasants wrapping our `usize`s in superfluous `Option`s... tsk tsk. I've performed the goat sacrifice and corrected our evil ways in this PR. Tonight we shall pray that Github Actions bestows the almighty green tick upon us. ## Additional Info NA Co-authored-by: realbigsean <seananderson33@gmail.com> Co-authored-by: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -156,14 +156,14 @@ where
|
||||
get_pubkey(proposer_index)
|
||||
.ok_or_else(|| Error::ValidatorUnknown(proposer_index as u64))?,
|
||||
spec,
|
||||
)?,
|
||||
),
|
||||
block_header_signature_set(
|
||||
state,
|
||||
&proposer_slashing.signed_header_2,
|
||||
get_pubkey(proposer_index)
|
||||
.ok_or_else(|| Error::ValidatorUnknown(proposer_index as u64))?,
|
||||
spec,
|
||||
)?,
|
||||
),
|
||||
))
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ fn block_header_signature_set<'a, T: EthSpec>(
|
||||
signed_header: &'a SignedBeaconBlockHeader,
|
||||
pubkey: Cow<'a, PublicKey>,
|
||||
spec: &'a ChainSpec,
|
||||
) -> Result<SignatureSet<'a>> {
|
||||
) -> SignatureSet<'a> {
|
||||
let domain = spec.get_domain(
|
||||
signed_header.message.slot.epoch(T::slots_per_epoch()),
|
||||
Domain::BeaconProposer,
|
||||
@@ -183,11 +183,7 @@ fn block_header_signature_set<'a, T: EthSpec>(
|
||||
|
||||
let message = signed_header.message.signing_root(domain);
|
||||
|
||||
Ok(SignatureSet::single_pubkey(
|
||||
&signed_header.signature,
|
||||
pubkey,
|
||||
message,
|
||||
))
|
||||
SignatureSet::single_pubkey(&signed_header.signature, pubkey, message)
|
||||
}
|
||||
|
||||
/// Returns the signature set for the given `indexed_attestation`.
|
||||
|
||||
Reference in New Issue
Block a user