diff --git a/bellman/src/gadgets/blake2s.rs b/bellman/src/gadgets/blake2s.rs index 9b6693b..8b1ff54 100644 --- a/bellman/src/gadgets/blake2s.rs +++ b/bellman/src/gadgets/blake2s.rs @@ -408,6 +408,7 @@ pub fn blake2s>( #[cfg(test)] mod test { use blake2s_simd::Params as Blake2sParams; + use hex_literal::hex; use pairing::bls12_381::Bls12; use rand_core::{RngCore, SeedableRng}; use rand_xorshift::XorShiftRng; diff --git a/bellman/src/gadgets/sha256.rs b/bellman/src/gadgets/sha256.rs index 0c8efea..1be898e 100644 --- a/bellman/src/gadgets/sha256.rs +++ b/bellman/src/gadgets/sha256.rs @@ -273,6 +273,7 @@ mod test { use super::*; use crate::gadgets::boolean::AllocatedBit; use crate::gadgets::test::TestConstraintSystem; + use hex_literal::hex; use pairing::bls12_381::Bls12; use rand_core::{RngCore, SeedableRng}; use rand_xorshift::XorShiftRng; diff --git a/bellman/src/lib.rs b/bellman/src/lib.rs index a3b577b..ef13a83 100644 --- a/bellman/src/lib.rs +++ b/bellman/src/lib.rs @@ -135,19 +135,6 @@ // Catch documentation errors caused by code changes. #![deny(intra_doc_link_resolution_failure)] -#[cfg(feature = "multicore")] -extern crate crossbeam; - -#[cfg(feature = "multicore")] -extern crate num_cpus; - -#[cfg(test)] -#[macro_use] -extern crate hex_literal; - -#[cfg(test)] -extern crate rand; - pub mod domain; pub mod gadgets; #[cfg(feature = "groth16")] diff --git a/ff/ff_derive/src/lib.rs b/ff/ff_derive/src/lib.rs index 7cdaf91..d47ec12 100644 --- a/ff/ff_derive/src/lib.rs +++ b/ff/ff_derive/src/lib.rs @@ -2,17 +2,11 @@ extern crate proc_macro; extern crate proc_macro2; -extern crate syn; -#[macro_use] -extern crate quote; - -extern crate num_bigint; -extern crate num_integer; -extern crate num_traits; use num_bigint::BigUint; use num_integer::Integer; use num_traits::{One, ToPrimitive, Zero}; +use quote::quote; use quote::TokenStreamExt; use std::str::FromStr; diff --git a/ff/src/lib.rs b/ff/src/lib.rs index 6be25da..b50cbd5 100644 --- a/ff/src/lib.rs +++ b/ff/src/lib.rs @@ -4,10 +4,6 @@ #![deny(intra_doc_link_resolution_failure)] #![allow(unused_imports)] -#[cfg(feature = "derive")] -#[macro_use] -extern crate ff_derive; - #[cfg(feature = "derive")] pub use ff_derive::*; diff --git a/zcash_primitives/src/jubjub/mod.rs b/zcash_primitives/src/jubjub/mod.rs index 555f3b9..9428600 100644 --- a/zcash_primitives/src/jubjub/mod.rs +++ b/zcash_primitives/src/jubjub/mod.rs @@ -469,6 +469,8 @@ impl JubjubBls12 { #[test] fn test_jubjub_bls12() { + use hex_literal::hex; + let params = JubjubBls12::new(); tests::test_suite::(¶ms); diff --git a/zcash_primitives/src/lib.rs b/zcash_primitives/src/lib.rs index 713ca2b..d882f5a 100644 --- a/zcash_primitives/src/lib.rs +++ b/zcash_primitives/src/lib.rs @@ -6,12 +6,7 @@ // Catch documentation errors caused by code changes. #![deny(intra_doc_link_resolution_failure)] -#[macro_use] -extern crate lazy_static; - -#[cfg(test)] -#[macro_use] -extern crate hex_literal; +use lazy_static::lazy_static; pub mod block; pub mod constants; diff --git a/zcash_primitives/src/sapling.rs b/zcash_primitives/src/sapling.rs index 4f57a43..da8b838 100644 --- a/zcash_primitives/src/sapling.rs +++ b/zcash_primitives/src/sapling.rs @@ -6,6 +6,7 @@ use crate::{ primitives::Note, }; use ff::{BitIterator, PrimeField, PrimeFieldRepr}; +use lazy_static::lazy_static; use pairing::bls12_381::{Bls12, Fr, FrRepr}; use rand_core::{CryptoRng, RngCore}; use std::io::{self, Read, Write};