mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Rust clippy 1.87 lint fixes (#7471)
Fix clippy lints for `rustc` 1.87 clippy complains about `BeaconChainError` being too large. I went on a bit of a boxing spree because of this. We may instead want to `Box` some of the `BeaconChainError` variants?
This commit is contained in:
@@ -7,9 +7,10 @@ pub fn pubkey_to_validator_index<T: BeaconChainTypes>(
|
||||
chain: &BeaconChain<T>,
|
||||
state: &BeaconState<T::EthSpec>,
|
||||
pubkey: &PublicKeyBytes,
|
||||
) -> Result<Option<usize>, BeaconChainError> {
|
||||
) -> Result<Option<usize>, Box<BeaconChainError>> {
|
||||
chain
|
||||
.validator_index(pubkey)?
|
||||
.validator_index(pubkey)
|
||||
.map_err(Box::new)?
|
||||
.filter(|&index| {
|
||||
state
|
||||
.validators()
|
||||
|
||||
Reference in New Issue
Block a user