Rust 1.54.0 lints (#2483)

## Issue Addressed

N/A

## Proposed Changes

- Removing a bunch of unnecessary references
- Updated `Error::VariantError` to `Error::Variant`
- There were additional enum variant lints that I ignored, because I thought our variant names were fine
- removed `MonitoredValidator`'s `pubkey` field, because I couldn't find it used anywhere. It looks like we just use the string version of the pubkey (the `id` field) if there is no index

## Additional Info



Co-authored-by: realbigsean <seananderson33@gmail.com>
This commit is contained in:
realbigsean
2021-07-30 01:11:47 +00:00
parent 8efd9fc324
commit 303deb9969
104 changed files with 307 additions and 313 deletions

View File

@@ -698,8 +698,8 @@ where
slot: Slot,
) -> HarnessAttestations<E> {
let unaggregated_attestations = self.make_unaggregated_attestations(
&attesting_validators,
&state,
attesting_validators,
state,
state_root,
block_hash,
slot,
@@ -785,7 +785,7 @@ where
relative_sync_committee: RelativeSyncCommittee,
) -> HarnessSyncContributions<E> {
let sync_messages =
self.make_sync_committee_messages(&state, block_hash, slot, relative_sync_committee);
self.make_sync_committee_messages(state, block_hash, slot, relative_sync_committee);
let sync_contributions: Vec<Option<SignedContributionAndProof<E>>> = sync_messages
.iter()
@@ -825,7 +825,7 @@ where
})?;
let default = SyncCommitteeContribution::from_message(
&sync_message,
sync_message,
subnet_id as u64,
*subcommittee_position,
)
@@ -989,7 +989,7 @@ where
let mut signed_block_headers = vec![block_header_1, block_header_2]
.into_iter()
.map(|block_header| {
block_header.sign::<E>(&sk, &fork, genesis_validators_root, &self.chain.spec)
block_header.sign::<E>(sk, &fork, genesis_validators_root, &self.chain.spec)
})
.collect::<Vec<_>>();
@@ -1199,7 +1199,7 @@ where
validators: &[usize],
) {
let attestations =
self.make_attestations(validators, &state, state_root, block_hash, block.slot());
self.make_attestations(validators, state, state_root, block_hash, block.slot());
self.process_attestations(attestations);
}