Fix clippy lints

This commit is contained in:
Paul Hauner
2019-03-20 10:51:53 +11:00
parent 8f23aefb29
commit 84f373fcc2
13 changed files with 38 additions and 51 deletions

View File

@@ -28,7 +28,7 @@ pub fn get_attestation_participants(
let mut participants = Vec::with_capacity(committee.len());
for (i, validator_index) in committee.iter().enumerate() {
match bitfield.get(i) {
Ok(bit) if bit == true => participants.push(*validator_index),
Ok(bit) if bit => participants.push(*validator_index),
_ => {}
}
}

View File

@@ -64,7 +64,6 @@ pub fn should_update_validator_registry(
let current_epoch_committee_count = spec.get_epoch_committee_count(num_active_validators);
for shard in (0..current_epoch_committee_count)
.into_iter()
.map(|i| (state.current_shuffling_start_shard + i as u64) % spec.shard_count)
{
if state.latest_crosslinks[shard as usize].epoch <= state.validator_registry_update_epoch {