chore: make clippy happy

This commit is contained in:
Oskar Thoren 2022-03-16 14:30:51 +08:00
parent 83fc39730f
commit 83ef5ae3c3
No known key found for this signature in database
GPG Key ID: B2ECCFD3BC2EF77E
6 changed files with 29 additions and 6 deletions

View File

@ -73,6 +73,12 @@ impl Multiplier {
} }
} }
impl Default for Multiplier {
fn default() -> Self {
Self::new()
}
}
#[test] #[test]
fn multiplier_proof() { fn multiplier_proof() {
let mul = Multiplier::new(); let mul = Multiplier::new();

View File

@ -10,13 +10,13 @@ use ark_groth16::{
use num_bigint::BigInt; use num_bigint::BigInt;
// Tracing // Tracing
use ark_relations::r1cs::{ConstraintLayer, ConstraintSystem, ConstraintTrace, TracingMode}; use ark_relations::r1cs::{ConstraintLayer, ConstraintTrace, TracingMode};
use tracing::{event, span, Level}; //use tracing::{event, span, Level};
use tracing_subscriber::layer::SubscriberExt; use tracing_subscriber::layer::SubscriberExt;
// JSON // JSON
use serde::Deserialize; use serde::Deserialize;
use serde_json; //use serde_json;
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]

View File

@ -16,6 +16,8 @@ pub struct Multiplier {
params: ProvingKey<Bn254>, params: ProvingKey<Bn254>,
} }
// TODO This should use poseidon-tornado stuff in main.rs for proper example
impl Multiplier { impl Multiplier {
// TODO Break this apart here // TODO Break this apart here
pub fn new() -> Multiplier { pub fn new() -> Multiplier {
@ -73,6 +75,12 @@ impl Multiplier {
} }
} }
impl Default for Multiplier {
fn default() -> Self {
Self::new()
}
}
#[test] #[test]
fn multiplier_proof() { fn multiplier_proof() {
let mul = Multiplier::new(); let mul = Multiplier::new();

View File

@ -1,3 +1,6 @@
#![allow(dead_code)]
#![allow(unused_imports)]
pub mod ffi; pub mod ffi;
pub mod identity; pub mod identity;
pub mod public; pub mod public;

View File

@ -10,13 +10,13 @@ use ark_groth16::{
use num_bigint::BigInt; use num_bigint::BigInt;
// Tracing // Tracing
use ark_relations::r1cs::{ConstraintLayer, ConstraintSystem, ConstraintTrace, TracingMode}; use ark_relations::r1cs::{ConstraintLayer, ConstraintTrace, TracingMode};
use tracing::{event, span, Level}; //use tracing::{event, span, Level};
use tracing_subscriber::layer::SubscriberExt; use tracing_subscriber::layer::SubscriberExt;
// JSON // JSON
use serde::Deserialize; use serde::Deserialize;
use serde_json; //use serde_json;
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
//#[serde(rename_all = "camelCase")] //#[serde(rename_all = "camelCase")]

View File

@ -178,6 +178,12 @@ impl RLN {
} }
} }
impl Default for RLN {
fn default() -> Self {
Self::new()
}
}
#[test] #[test]
fn rln_proof() { fn rln_proof() {
let mul = RLN::new(); let mul = RLN::new();