From 5a0b57594450efbc44771c66244c06860ede34ab Mon Sep 17 00:00:00 2001 From: 0xKitsune <0xKitsune@protonmail.com> Date: Mon, 18 Sep 2023 14:04:52 -0400 Subject: [PATCH] chore: cargo fmt --- src/database/mod.rs | 9 +++++++-- src/prover/map.rs | 1 - src/prover/mod.rs | 1 - src/task_monitor/tasks/delete_identities.rs | 7 ++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/database/mod.rs b/src/database/mod.rs index 738190d5..22dbf35f 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -408,7 +408,12 @@ impl Database { let url = row.get::(1); let timeout_s = row.get::(2) as u64; let prover_type = row.get::(3); - ProverConfiguration { url, timeout_s, batch_size, prover_type } + ProverConfiguration { + url, + timeout_s, + batch_size, + prover_type, + } }) .collect::()) } @@ -771,7 +776,7 @@ mod test { use ruint::Uint; use semaphore::Field; use sqlx::types::chrono::DateTime; - use sqlx::{Row}; + use sqlx::Row; use super::{Database, Options}; use crate::identity_tree::{Hash, Status}; diff --git a/src/prover/map.rs b/src/prover/map.rs index 29263374..ba5a27c2 100644 --- a/src/prover/map.rs +++ b/src/prover/map.rs @@ -1,6 +1,5 @@ use std::collections::BTreeMap; - use tokio::sync::{RwLock, RwLockReadGuard}; use crate::prover::{Prover, ProverConfiguration, ProverType, Provers}; diff --git a/src/prover/mod.rs b/src/prover/mod.rs index e0c1b45a..42152f25 100644 --- a/src/prover/mod.rs +++ b/src/prover/mod.rs @@ -12,7 +12,6 @@ pub mod map; pub mod proof; use std::collections::HashSet; - use std::fmt::{Display, Formatter}; use std::hash::{Hash, Hasher}; use std::mem::size_of; diff --git a/src/task_monitor/tasks/delete_identities.rs b/src/task_monitor/tasks/delete_identities.rs index 0af44c78..83b8a984 100644 --- a/src/task_monitor/tasks/delete_identities.rs +++ b/src/task_monitor/tasks/delete_identities.rs @@ -2,11 +2,10 @@ use std::collections::HashSet; use std::sync::Arc; use anyhow::Result as AnyhowResult; -use chrono::{Utc}; +use chrono::Utc; use tokio::sync::Notify; use tracing::info; - use crate::database::types::DeletionEntry; use crate::database::Database; use crate::identity_tree::{Hash, Latest, TreeVersion}; @@ -77,9 +76,7 @@ async fn delete_identities( || Utc::now() - last_deletion_timestamp > deletion_time_interval { // Dedup deletion entries - let deletions = deletions - .into_iter() - .collect::>(); + let deletions = deletions.into_iter().collect::>(); let (leaf_indices, previous_commitments): (Vec, Vec) = deletions .iter()