Remove pre-2018 extern crate uses

This commit is contained in:
Paul Hauner 2019-01-25 16:46:16 +11:00
parent ea523c8658
commit 5ef02688d5
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6
25 changed files with 27 additions and 25 deletions

View File

@ -62,9 +62,9 @@ impl<T: RngCore> TestRandom<T> for Attestation {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -102,9 +102,9 @@ impl<T: RngCore> TestRandom<T> for AttestationData {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -39,9 +39,9 @@ impl<T: RngCore> TestRandom<T> for AttestationDataAndCustodyBit {
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -5,6 +5,8 @@ use hashing::canonical_hash;
use rand::RngCore; use rand::RngCore;
use ssz::{ssz_encode, Decodable, DecodeError, Encodable, SszStream}; use ssz::{ssz_encode, Decodable, DecodeError, Encodable, SszStream};
mod signing;
#[derive(Debug, PartialEq, Clone)] #[derive(Debug, PartialEq, Clone)]
pub struct BeaconBlock { pub struct BeaconBlock {
pub slot: u64, pub slot: u64,
@ -77,9 +79,9 @@ impl<T: RngCore> TestRandom<T> for BeaconBlock {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -78,9 +78,9 @@ impl<T: RngCore> TestRandom<T> for BeaconBlockBody {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -42,9 +42,9 @@ impl<T: RngCore> TestRandom<T> for CasperSlashing {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -52,9 +52,9 @@ impl<T: RngCore> TestRandom<T> for Crosslink {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -47,9 +47,9 @@ impl<T: RngCore> TestRandom<T> for Deposit {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -47,9 +47,9 @@ impl<T: RngCore> TestRandom<T> for DepositData {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -48,9 +48,9 @@ impl<T: RngCore> TestRandom<T> for DepositInput {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -43,9 +43,9 @@ impl<T: RngCore> TestRandom<T> for Eth1Data {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -43,9 +43,9 @@ impl<T: RngCore> TestRandom<T> for Eth1DataVote {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -47,9 +47,9 @@ impl<T: RngCore> TestRandom<T> for Exit {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -46,9 +46,9 @@ impl<T: RngCore> TestRandom<T> for Fork {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -52,9 +52,9 @@ impl<T: RngCore> TestRandom<T> for PendingAttestation {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -47,9 +47,9 @@ impl<T: RngCore> TestRandom<T> for ProposalSignedData {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -58,9 +58,9 @@ impl<T: RngCore> TestRandom<T> for ProposerSlashing {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -35,9 +35,9 @@ impl<T: RngCore> TestRandom<T> for ShardCommittee {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -53,9 +53,9 @@ impl<T: RngCore> TestRandom<T> for SlashableVoteData {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -162,9 +162,9 @@ impl<T: RngCore> TestRandom<T> for Validator {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -72,9 +72,9 @@ impl<T: RngCore> TestRandom<T> for ValidatorRegistryDeltaBlock {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng}; use crate::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -47,8 +47,8 @@ impl Decodable for AggregateSignature {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::super::{Keypair, Signature}; use super::super::{Keypair, Signature};
use super::ssz::ssz_encode;
use super::*; use super::*;
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -67,8 +67,8 @@ impl Hash for PublicKey {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::ssz::ssz_encode;
use super::*; use super::*;
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -42,8 +42,8 @@ impl Decodable for SecretKey {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::super::ssz::ssz_encode;
use super::*; use super::*;
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {

View File

@ -60,8 +60,8 @@ impl Decodable for Signature {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::super::Keypair; use super::super::Keypair;
use super::ssz::ssz_encode;
use super::*; use super::*;
use ssz::ssz_encode;
#[test] #[test]
pub fn test_ssz_round_trip() { pub fn test_ssz_round_trip() {