mirror of https://github.com/vacp2p/zerokit.git
style(semaphore): cargo fmt
This commit is contained in:
parent
c4ec421e2c
commit
8171439a44
|
@ -1,17 +1,15 @@
|
|||
#![allow(clippy::multiple_crate_versions)]
|
||||
|
||||
pub mod protocol;
|
||||
pub mod circuit;
|
||||
pub mod protocol;
|
||||
|
||||
#[cfg(feature = "dylib")]
|
||||
pub use circuit::initialize;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use semaphore::{
|
||||
hash_to_field, identity::Identity, poseidon_tree::PoseidonTree, Field,
|
||||
};
|
||||
use crate::protocol::*;
|
||||
use semaphore::{hash_to_field, identity::Identity, poseidon_tree::PoseidonTree, Field};
|
||||
|
||||
#[test]
|
||||
fn test_semaphore() {
|
||||
|
|
|
@ -2,17 +2,8 @@
|
|||
// For illustration purposes only as an example protocol
|
||||
|
||||
// Private module
|
||||
use crate::{
|
||||
circuit::{witness_calculator, zkey}
|
||||
};
|
||||
use crate::circuit::{witness_calculator, zkey};
|
||||
|
||||
use semaphore::{
|
||||
identity::Identity,
|
||||
merkle_tree::{self, Branch},
|
||||
poseidon_hash,
|
||||
poseidon_tree::PoseidonHash,
|
||||
Field,
|
||||
};
|
||||
use ark_bn254::{Bn254, Parameters};
|
||||
use ark_circom::CircomReduction;
|
||||
use ark_ec::bn::Bn;
|
||||
|
@ -24,6 +15,13 @@ use ark_std::UniformRand;
|
|||
use color_eyre::Result;
|
||||
use primitive_types::U256;
|
||||
use rand::{thread_rng, Rng};
|
||||
use semaphore::{
|
||||
identity::Identity,
|
||||
merkle_tree::{self, Branch},
|
||||
poseidon_hash,
|
||||
poseidon_tree::PoseidonHash,
|
||||
Field,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::time::Instant;
|
||||
use thiserror::Error;
|
||||
|
@ -218,9 +216,9 @@ pub fn verify_proof(
|
|||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use semaphore::{hash_to_field, poseidon_tree::PoseidonTree};
|
||||
use rand::SeedableRng as _;
|
||||
use rand_chacha::ChaChaRng;
|
||||
use semaphore::{hash_to_field, poseidon_tree::PoseidonTree};
|
||||
use serde_json::json;
|
||||
|
||||
fn arb_proof(seed: u64) -> Proof {
|
||||
|
|
Loading…
Reference in New Issue