From 5944bd0011eefe303a2e1ac93940b3dba92e9c13 Mon Sep 17 00:00:00 2001 From: 0xKitsune <0xKitsune@protonmail.com> Date: Mon, 18 Sep 2023 14:06:40 -0400 Subject: [PATCH] chore: cargo clippy, fixed validate_proof_with_age test --- src/app.rs | 2 +- src/database/mod.rs | 2 +- src/task_monitor.rs | 6 +++--- src/task_monitor/tasks/mine_identities.rs | 2 +- tests/validate_proof_with_age.rs | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app.rs b/src/app.rs index b07e8a48..baecd9d8 100644 --- a/src/app.rs +++ b/src/app.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use std::time::Instant; use anyhow::Result as AnyhowResult; -use chrono::{DateTime, Duration, Utc}; +use chrono::{Duration, Utc}; use clap::Parser; use hyper::StatusCode; use ruint::Uint; diff --git a/src/database/mod.rs b/src/database/mod.rs index 22dbf35f..e863c11f 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -775,7 +775,7 @@ mod test { use postgres_docker_utils::DockerContainerGuard; use ruint::Uint; use semaphore::Field; - use sqlx::types::chrono::DateTime; + use sqlx::Row; use super::{Database, Options}; diff --git a/src/task_monitor.rs b/src/task_monitor.rs index 85b47ebf..e0a33c9b 100644 --- a/src/task_monitor.rs +++ b/src/task_monitor.rs @@ -205,9 +205,9 @@ impl TaskMonitor { pending_identities_capacity, scanning_window_size, time_between_scans_seconds, - batch_deletion_timeout_seconds, - min_batch_deletion_size, - insert_identities_capacity, + batch_deletion_timeout_seconds: _, + min_batch_deletion_size: _, + insert_identities_capacity: _, } = *options; Self { diff --git a/src/task_monitor/tasks/mine_identities.rs b/src/task_monitor/tasks/mine_identities.rs index 74f574f9..2c43c681 100644 --- a/src/task_monitor/tasks/mine_identities.rs +++ b/src/task_monitor/tasks/mine_identities.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use anyhow::{Context, Result as AnyhowResult}; use chrono::{DateTime, Utc}; -use ethers::types::U256; + use tracing::{info, instrument}; use crate::contracts::{IdentityManager, SharedIdentityManager}; diff --git a/tests/validate_proof_with_age.rs b/tests/validate_proof_with_age.rs index 5667e7f8..da5ef4a7 100644 --- a/tests/validate_proof_with_age.rs +++ b/tests/validate_proof_with_age.rs @@ -21,10 +21,10 @@ async fn validate_proof_with_age() -> anyhow::Result<()> { let tree_depth: u8 = SUPPORTED_DEPTH as u8; let batch_size = 3; - let (mock_chain, db_container, prover_map, micro_oz) = + let (mock_chain, db_container, insertion_prover_map, _deletion_prover_map, micro_oz) = spawn_deps(initial_root, &[batch_size], &vec![], tree_depth).await?; - let prover_mock = &prover_map[&batch_size]; + let prover_mock = &insertion_prover_map[&batch_size]; let port = db_container.port(); let db_url = format!("postgres://postgres:postgres@localhost:{port}/database"); @@ -155,7 +155,7 @@ async fn validate_proof_with_age() -> anyhow::Result<()> { // Shutdown the app properly for the final time shutdown(); app.await.unwrap(); - for (_, prover) in prover_map.into_iter() { + for (_, prover) in insertion_prover_map.into_iter() { prover.stop(); } reset_shutdown();