Instead of macro_use, use use.
This commit is contained in:
parent
0cadd3196f
commit
05cde32d01
|
@ -1,10 +1,9 @@
|
|||
#[macro_use]
|
||||
extern crate criterion;
|
||||
extern crate pairing;
|
||||
extern crate rand;
|
||||
extern crate threshold_crypto;
|
||||
|
||||
use criterion::Criterion;
|
||||
use criterion::{criterion_group, criterion_main, Criterion};
|
||||
use threshold_crypto::poly::Poly;
|
||||
use threshold_crypto::Fr;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
extern crate bincode;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate threshold_crypto;
|
||||
|
||||
use bincode::{deserialize, serialize};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use threshold_crypto::{PublicKey, SecretKey, Signature};
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
//! Crypto errors.
|
||||
|
||||
use failure::Fail;
|
||||
|
||||
/// A crypto error.
|
||||
#[derive(Clone, Eq, PartialEq, Debug, Fail)]
|
||||
pub enum Error {
|
||||
|
|
|
@ -15,20 +15,15 @@
|
|||
extern crate bincode;
|
||||
extern crate byteorder;
|
||||
extern crate errno;
|
||||
#[macro_use]
|
||||
extern crate failure;
|
||||
extern crate hex_fmt;
|
||||
extern crate init_with;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate memsec;
|
||||
extern crate rand;
|
||||
#[macro_use]
|
||||
extern crate rand_derive;
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate tiny_keccak;
|
||||
|
||||
|
@ -48,14 +43,17 @@ use std::ptr::copy_nonoverlapping;
|
|||
use byteorder::{BigEndian, ByteOrder};
|
||||
use hex_fmt::HexFmt;
|
||||
use init_with::InitWith;
|
||||
use log::debug;
|
||||
use pairing::{CurveAffine, CurveProjective, Engine, Field};
|
||||
use rand::{ChaChaRng, OsRng, Rand, Rng, SeedableRng};
|
||||
use rand_derive::Rand;
|
||||
use tiny_keccak::sha3_256;
|
||||
|
||||
use error::{Error, Result};
|
||||
use into_fr::IntoFr;
|
||||
use poly::{Commitment, Poly};
|
||||
use secret::{clear_fr, ContainsSecret, MemRange, FR_SIZE};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
|
||||
#[cfg(not(feature = "use-insecure-test-only-mock-crypto"))]
|
||||
pub use pairing::bls12_381::{Bls12 as PEngine, Fr, G1Affine, G2Affine, G1, G2};
|
||||
|
|
|
@ -22,13 +22,14 @@ use std::hash::{Hash, Hasher};
|
|||
use std::mem::size_of_val;
|
||||
use std::{cmp, iter, ops};
|
||||
|
||||
use super::{Fr, G1Affine, G1};
|
||||
use pairing::{CurveAffine, CurveProjective, Field};
|
||||
use rand::Rng;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
|
||||
use error::{Error, Result};
|
||||
use into_fr::IntoFr;
|
||||
use secret::{clear_fr, ContainsSecret, MemRange, Safe};
|
||||
use {Fr, G1Affine, G1};
|
||||
|
||||
/// A univariate polynomial in the prime field.
|
||||
#[derive(Serialize, Deserialize, PartialEq, Eq)]
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
use std::mem::{size_of, size_of_val};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use memsec::memzero;
|
||||
|
||||
use Fr;
|
||||
|
||||
lazy_static! {
|
||||
|
|
|
@ -3,6 +3,7 @@ use std::borrow::Cow;
|
|||
use super::G1;
|
||||
use serde::de::Error as DeserializeError;
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
|
||||
use poly::{coeff_pos, BivarCommitment};
|
||||
|
||||
|
@ -200,6 +201,7 @@ mod tests {
|
|||
use bincode;
|
||||
use pairing::Engine;
|
||||
use rand::{self, Rng};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
|
||||
use poly::BivarPoly;
|
||||
|
||||
|
|
Loading…
Reference in New Issue