Organize imports (#188)

* Organize imports

Use rustfmt to organize imports.  Resolve #162

* remove unused imports

* cargo fmt
This commit is contained in:
Eduard S. 2025-04-07 16:19:13 -07:00 committed by GitHub
parent 1214cdfa1b
commit 24ff82dd3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 329 additions and 276 deletions

View file

@ -1,12 +1,10 @@
use std::{any::Any, fmt};
use anyhow::{anyhow, Result};
use base64::prelude::*;
use itertools::Itertools;
use log::error;
use plonky2::hash::poseidon::PoseidonHash;
use plonky2::plonk::config::Hasher;
use plonky2::{hash::poseidon::PoseidonHash, plonk::config::Hasher};
use serde::{Deserialize, Serialize};
use std::any::Any;
use std::fmt;
use crate::{
backends::plonky2::primitives::merkletree,
@ -608,13 +606,14 @@ impl Pod for MockMainPod {
#[cfg(test)]
pub mod tests {
use super::*;
use crate::backends::plonky2::mock::signedpod::MockSigner;
use crate::examples::{
great_boy_pod_full_flow, tickets_pod_full_flow, zu_kyc_pod_builder,
zu_kyc_sign_pod_builders,
use crate::{
backends::plonky2::mock::signedpod::MockSigner,
examples::{
great_boy_pod_full_flow, tickets_pod_full_flow, zu_kyc_pod_builder,
zu_kyc_sign_pod_builders,
},
middleware,
};
use crate::middleware;
use crate::middleware::containers::Set;
#[test]
fn test_mock_main_zu_kyc() -> Result<()> {

View file

@ -1,12 +1,16 @@
use super::Statement;
use std::{fmt, iter};
use anyhow::{anyhow, Result};
use plonky2::field::types::Field;
use serde::{Deserialize, Serialize};
use crate::{
backends::plonky2::primitives::merkletree::{self, kv_hash},
backends::plonky2::{
mock::mainpod::Statement,
primitives::merkletree::{self},
},
middleware::{self, Hash, OperationType, Params, ToFields, Value, EMPTY_HASH, EMPTY_VALUE, F},
};
use anyhow::{anyhow, Result};
use plonky2::field::types::{Field, PrimeField64};
use serde::{Deserialize, Serialize};
use std::{fmt, iter};
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum OperationArg {

View file

@ -1,6 +1,7 @@
use std::fmt;
use anyhow::{anyhow, Result};
use serde::{Deserialize, Serialize};
use std::fmt;
use crate::middleware::{
self, AnchoredKey, NativePredicate, Params, Predicate, StatementArg, ToFields,

View file

@ -1,13 +1,15 @@
use std::{any::Any, collections::HashMap};
use anyhow::{anyhow, Result};
use itertools::Itertools;
use std::any::Any;
use std::collections::HashMap;
use crate::backends::plonky2::primitives::merkletree::MerkleTree;
use crate::constants::MAX_DEPTH;
use crate::middleware::{
containers::Dictionary, hash_str, AnchoredKey, Hash, Params, Pod, PodId, PodSigner, PodType,
Statement, Value, KEY_SIGNER, KEY_TYPE,
use crate::{
backends::plonky2::primitives::merkletree::MerkleTree,
constants::MAX_DEPTH,
middleware::{
containers::Dictionary, hash_str, AnchoredKey, Hash, Params, Pod, PodId, PodSigner,
PodType, Statement, Value, KEY_SIGNER, KEY_TYPE,
},
};
pub struct MockSigner {
@ -129,13 +131,16 @@ impl Pod for MockSignedPod {
#[cfg(test)]
pub mod tests {
use plonky2::field::types::Field;
use std::iter;
use plonky2::field::types::Field;
use super::*;
use crate::constants::MAX_DEPTH;
use crate::frontend;
use crate::middleware::{self, EMPTY_HASH, F};
use crate::{
constants::MAX_DEPTH,
frontend,
middleware::{self, EMPTY_HASH, F},
};
#[test]
fn test_mock_signed_0() -> Result<()> {