mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Add various fixes to clippy lints
Thou shalt appease clippy
This commit is contained in:
@@ -49,7 +49,7 @@ fn verify_indexed_attestation_parametric<T: EthSpec>(
|
||||
);
|
||||
|
||||
// Check that nobody signed with custody bit 1 (to be removed in phase 1)
|
||||
if custody_bit_1_indices.len() > 0 {
|
||||
if !custody_bit_1_indices.is_empty() {
|
||||
invalid!(Invalid::CustodyBitfieldHasSetBits);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ where
|
||||
state
|
||||
.validator_registry
|
||||
.get(validator_idx as usize)
|
||||
.ok_or(Error::Invalid(Invalid::UnknownValidator(validator_idx)))
|
||||
.ok_or_else(|| Error::Invalid(Invalid::UnknownValidator(validator_idx)))
|
||||
.map(|validator| {
|
||||
aggregate_pubkey.add(&validator.pubkey);
|
||||
aggregate_pubkey
|
||||
|
||||
@@ -156,7 +156,7 @@ pub fn process_crosslinks<T: EthSpec>(
|
||||
|
||||
state.previous_crosslinks = state.current_crosslinks.clone();
|
||||
|
||||
for relative_epoch in vec![RelativeEpoch::Previous, RelativeEpoch::Current] {
|
||||
for &relative_epoch in &[RelativeEpoch::Previous, RelativeEpoch::Current] {
|
||||
let epoch = relative_epoch.into_epoch(state.current_epoch());
|
||||
for offset in 0..state.get_epoch_committee_count(relative_epoch)? {
|
||||
let shard =
|
||||
|
||||
Reference in New Issue
Block a user