Add rustfmt.toml and cargo fmt
(#23238)
* fmt * formatted Co-authored-by: Lucas B <buffalu@jito.network>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
//! Errors related to proving and verifying proofs.
|
||||
use crate::{range_proof::errors::RangeProofError, sigma_proofs::errors::*};
|
||||
use thiserror::Error;
|
||||
use {
|
||||
crate::{range_proof::errors::RangeProofError, sigma_proofs::errors::*},
|
||||
thiserror::Error,
|
||||
};
|
||||
|
||||
// TODO: clean up errors for encryption
|
||||
#[derive(Error, Clone, Debug, Eq, PartialEq)]
|
||||
|
@@ -1,6 +1,5 @@
|
||||
//! Errors related to proving and verifying range proofs.
|
||||
use crate::errors::TranscriptError;
|
||||
use thiserror::Error;
|
||||
use {crate::errors::TranscriptError, thiserror::Error};
|
||||
|
||||
#[derive(Error, Clone, Debug, Eq, PartialEq)]
|
||||
pub enum RangeProofError {
|
||||
|
@@ -448,8 +448,10 @@ impl CtxtCtxtEqualityProof {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::encryption::{elgamal::ElGamalSecretKey, pedersen::Pedersen};
|
||||
use {
|
||||
super::*,
|
||||
crate::encryption::{elgamal::ElGamalSecretKey, pedersen::Pedersen},
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn test_ciphertext_commitment_equality_proof_correctness() {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
//! Errors related to proving and verifying sigma proofs.
|
||||
use crate::errors::TranscriptError;
|
||||
use thiserror::Error;
|
||||
use {crate::errors::TranscriptError, thiserror::Error};
|
||||
|
||||
#[derive(Error, Clone, Debug, Eq, PartialEq)]
|
||||
pub enum EqualityProofError {
|
||||
|
@@ -448,8 +448,7 @@ fn conditional_select_ristretto(
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::encryption::pedersen::Pedersen;
|
||||
use {super::*, crate::encryption::pedersen::Pedersen};
|
||||
|
||||
#[test]
|
||||
fn test_fee_above_max_proof() {
|
||||
|
@@ -298,8 +298,10 @@ impl AggregatedValidityProof {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::encryption::{elgamal::ElGamalKeypair, pedersen::Pedersen};
|
||||
use {
|
||||
super::*,
|
||||
crate::encryption::{elgamal::ElGamalKeypair, pedersen::Pedersen},
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn test_validity_proof_correctness() {
|
||||
|
@@ -166,10 +166,12 @@ impl ZeroBalanceProof {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::encryption::{
|
||||
elgamal::{DecryptHandle, ElGamalKeypair, ElGamalSecretKey},
|
||||
pedersen::{Pedersen, PedersenCommitment, PedersenOpening},
|
||||
use {
|
||||
super::*,
|
||||
crate::encryption::{
|
||||
elgamal::{DecryptHandle, ElGamalKeypair, ElGamalSecretKey},
|
||||
pedersen::{Pedersen, PedersenCommitment, PedersenOpening},
|
||||
},
|
||||
};
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user