Skip to content

Commit

Permalink
chore: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
0xKitsune committed Sep 18, 2023
1 parent 3058bec commit 5a0b575
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
9 changes: 7 additions & 2 deletions src/database/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,12 @@ impl Database {
let url = row.get::<String, _>(1);
let timeout_s = row.get::<i64, _>(2) as u64;
let prover_type = row.get::<ProverType, _>(3);
ProverConfiguration { url, timeout_s, batch_size, prover_type }
ProverConfiguration {
url,
timeout_s,
batch_size,
prover_type,
}
})
.collect::<Provers>())
}
Expand Down Expand Up @@ -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};
Expand Down
1 change: 0 additions & 1 deletion src/prover/map.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::collections::BTreeMap;


use tokio::sync::{RwLock, RwLockReadGuard};

use crate::prover::{Prover, ProverConfiguration, ProverType, Provers};
Expand Down
1 change: 0 additions & 1 deletion src/prover/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 2 additions & 5 deletions src/task_monitor/tasks/delete_identities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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::<HashSet<DeletionEntry>>();
let deletions = deletions.into_iter().collect::<HashSet<DeletionEntry>>();

let (leaf_indices, previous_commitments): (Vec<usize>, Vec<Hash>) = deletions
.iter()
Expand Down

0 comments on commit 5a0b575

Please sign in to comment.