reformat imports

This commit is contained in:
Michael Vines 2021-12-03 09:06:31 -08:00
parent c61775664e
commit aba8c2f4af
9 changed files with 34 additions and 34 deletions

View File

@ -146,9 +146,13 @@ impl CloseAccountProof {
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use super::*; use {
use crate::encryption::elgamal::ElGamalKeypair; super::*,
use crate::encryption::pedersen::{Pedersen, PedersenDecryptHandle, PedersenOpening}; crate::encryption::{
elgamal::ElGamalKeypair,
pedersen::{Pedersen, PedersenDecryptHandle, PedersenOpening},
},
};
#[test] #[test]
fn test_close_account_correctness() { fn test_close_account_correctness() {

View File

@ -480,8 +480,7 @@ pub fn combine_u32_ciphertexts(ct_lo: ElGamalCiphertext, ct_hi: ElGamalCiphertex
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use super::*; use {super::*, crate::encryption::elgamal::ElGamalKeypair};
use crate::encryption::elgamal::ElGamalKeypair;
#[test] #[test]
fn test_transfer_correctness() { fn test_transfer_correctness() {

View File

@ -172,8 +172,7 @@ impl WithdrawProof {
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use super::*; use {super::*, crate::encryption::elgamal::ElGamalKeypair};
use crate::encryption::elgamal::ElGamalKeypair;
#[test] #[test]
#[ignore] #[ignore]

View File

@ -1,15 +1,14 @@
use core::iter; use {
use std::borrow::Borrow; crate::{errors::ProofError, range_proof::util, transcript::TranscriptProtocol},
core::iter,
use curve25519_dalek::ristretto::{CompressedRistretto, RistrettoPoint}; curve25519_dalek::{
use curve25519_dalek::scalar::Scalar; ristretto::{CompressedRistretto, RistrettoPoint},
use curve25519_dalek::traits::VartimeMultiscalarMul; scalar::Scalar,
traits::VartimeMultiscalarMul,
use crate::errors::ProofError; },
use crate::range_proof::util; merlin::Transcript,
use crate::transcript::TranscriptProtocol; std::borrow::Borrow,
};
use merlin::Transcript;
#[allow(non_snake_case)] #[allow(non_snake_case)]
#[derive(Clone)] #[derive(Clone)]

View File

@ -7,8 +7,9 @@ use {
}; };
use { use {
crate::{ crate::{
encryption::pedersen::PedersenBase, errors::ProofError, encryption::pedersen::PedersenBase,
range_proof::generators::BulletproofGens, range_proof::inner_product::InnerProductProof, errors::ProofError,
range_proof::{generators::BulletproofGens, inner_product::InnerProductProof},
transcript::TranscriptProtocol, transcript::TranscriptProtocol,
}, },
core::iter, core::iter,

View File

@ -1,10 +1,8 @@
use curve25519_dalek::ristretto::CompressedRistretto; use {
use curve25519_dalek::scalar::Scalar; crate::errors::ProofError,
use curve25519_dalek::traits::IsIdentity; curve25519_dalek::{ristretto::CompressedRistretto, scalar::Scalar, traits::IsIdentity},
merlin::Transcript,
use merlin::Transcript; };
use crate::errors::ProofError;
pub trait TranscriptProtocol { pub trait TranscriptProtocol {
/// Append a domain separator for an `n`-bit rangeproof for ElGamalKeypair /// Append a domain separator for an `n`-bit rangeproof for ElGamalKeypair

View File

@ -15,9 +15,11 @@ mod target_arch {
use { use {
super::pod, super::pod,
crate::{ crate::{
encryption::aes::AesCiphertext, encryption::{
encryption::elgamal::{ElGamalCiphertext, ElGamalPubkey}, aes::AesCiphertext,
encryption::pedersen::{PedersenCommitment, PedersenDecryptHandle}, elgamal::{ElGamalCiphertext, ElGamalPubkey},
pedersen::{PedersenCommitment, PedersenDecryptHandle},
},
errors::ProofError, errors::ProofError,
range_proof::RangeProof, range_proof::RangeProof,
}, },

View File

@ -1,6 +1,5 @@
use std::fmt;
pub use bytemuck::{Pod, Zeroable}; pub use bytemuck::{Pod, Zeroable};
use std::fmt;
#[derive(Clone, Copy, Pod, Zeroable, PartialEq)] #[derive(Clone, Copy, Pod, Zeroable, PartialEq)]
#[repr(transparent)] #[repr(transparent)]

View File

@ -1,6 +1,5 @@
///! Instructions provided by the ZkToken Proof program ///! Instructions provided by the ZkToken Proof program
pub use crate::instruction::*; pub use crate::instruction::*;
use { use {
bytemuck::{bytes_of, Pod}, bytemuck::{bytes_of, Pod},
num_derive::{FromPrimitive, ToPrimitive}, num_derive::{FromPrimitive, ToPrimitive},