Rearrange and tidy imports

This commit is contained in:
Deirdre Connolly 2020-01-28 02:00:07 -05:00 committed by Deirdre Connolly
parent 53a7af82a0
commit ac3c31b1c2
4 changed files with 12 additions and 8 deletions

View File

@ -1,8 +1,5 @@
use std::{fmt, io};
#[cfg(test)]
use proptest::{arbitrary::Arbitrary, collection::vec, prelude::*};
use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
/// An encoding of a BCTV14 proof, as used in Zcash.
@ -51,6 +48,9 @@ impl ZcashDeserialize for Bctv14Proof {
}
}
#[cfg(test)]
use proptest::{arbitrary::Arbitrary, collection::vec, prelude::*};
#[cfg(test)]
impl Arbitrary for Bctv14Proof {
type Parameters = ();

View File

@ -1,8 +1,5 @@
use std::{fmt, io};
#[cfg(test)]
use proptest::{arbitrary::Arbitrary, collection::vec, prelude::*};
use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
/// An encoding of a Groth16 proof, as used in Zcash.
@ -51,6 +48,9 @@ impl ZcashDeserialize for Groth16Proof {
}
}
#[cfg(test)]
use proptest::{arbitrary::Arbitrary, collection::vec, prelude::*};
#[cfg(test)]
impl Arbitrary for Groth16Proof {
type Parameters = ();

View File

@ -1,8 +1,10 @@
use std::{fmt, io};
use futures::future::Either;
#[cfg(test)]
use proptest::{arbitrary::Arbitrary, array, collection::vec, prelude::*};
#[cfg(test)]
use proptest_derive::Arbitrary;

View File

@ -8,8 +8,7 @@ use std::{
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use chrono::{DateTime, TimeZone, Utc};
use hex;
#[cfg(test)]
use proptest::prelude::*;
#[cfg(test)]
use proptest_derive::Arbitrary;
@ -126,6 +125,9 @@ impl ZcashDeserialize for Script {
}
}
#[cfg(test)]
use proptest::prelude::*;
#[cfg(test)]
mod tests {
use super::*;