Run rustfmt on entire codebase

Signed-off-by: Paul Hauner <paul@paulhauner.com>
This commit is contained in:
Paul Hauner
2019-01-21 18:41:07 +11:00
parent ab502de8ec
commit 24a27891b8
14 changed files with 90 additions and 50 deletions

View File

@@ -6,12 +6,13 @@ pub mod address;
pub mod aggregate_signature;
pub mod bitfield;
pub mod hash256;
pub mod signature;
pub mod secret_key;
pub mod public_key;
pub mod secret_key;
pub mod signature;
pub trait TestRandom<T>
where T: RngCore
where
T: RngCore,
{
fn random_for_test(rng: &mut T) -> Self;
}
@@ -35,7 +36,8 @@ impl<T: RngCore> TestRandom<T> for usize {
}
impl<T: RngCore, U> TestRandom<T> for Vec<U>
where U: TestRandom<T>
where
U: TestRandom<T>,
{
fn random_for_test(rng: &mut T) -> Self {
vec![

View File

@@ -1,5 +1,5 @@
use super::bls::PublicKey;
use super::{Hash256};
use super::Hash256;
use crate::test_utils::TestRandom;
use rand::RngCore;
use ssz::{Decodable, DecodeError, Encodable, SszStream};
@@ -40,7 +40,7 @@ pub struct ValidatorRecord {
pub exit_count: u64,
pub custody_commitment: Hash256,
pub latest_custody_reseed_slot: u64,
pub penultimate_custody_reseed_slot: u64
pub penultimate_custody_reseed_slot: u64,
}
impl ValidatorRecord {
@@ -132,7 +132,7 @@ impl Decodable for ValidatorRecord {
exit_count,
custody_commitment,
latest_custody_reseed_slot,
penultimate_custody_reseed_slot
penultimate_custody_reseed_slot,
},
i,
))