Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy warnings #721

Merged
merged 3 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 23 additions & 77 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ oz-api = { path = "crates/oz-api" }
# We need upstream PR#465 to fix #272.
prometheus = "0.13.3"
reqwest = { version = "0.11.18", features = ["json"] }
# ruint has broken semver, specify exact version.
ruint = { version = "=1.11.1", features = ["primitive-types", "sqlx"] }
semaphore = { git = "https://github.com/worldcoin/semaphore-rs", branch = "main", features = [
ruint = { version = "1.12.1", features = ["primitive-types", "sqlx"] }
semaphore = { git = "https://github.com/worldcoin/semaphore-rs", rev = "5170c42292a4abc9e332742c8c392a480b075609", features = [
"depth_30",
] }
serde = { version = "1.0", features = ["derive"] }
Expand Down Expand Up @@ -88,7 +87,7 @@ maplit = "1.0.2"
micro-oz = { path = "crates/micro-oz" }
postgres-docker-utils = { path = "crates/postgres-docker-utils" }
regex = { version = "1.7.1", features = ["std"] }
semaphore = { git = "https://github.com/worldcoin/semaphore-rs", branch = "main", features = [
semaphore = { git = "https://github.com/worldcoin/semaphore-rs", rev = "5170c42292a4abc9e332742c8c392a480b075609", features = [
"depth_20",
] }
similar-asserts = "1.5.0"
Expand Down
6 changes: 3 additions & 3 deletions src/database/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,8 @@ pub trait DatabaseExt<'a>: Executor<'a, Database = Postgres> {
async fn identity_exists(self, commitment: Hash) -> Result<bool, Error> {
Ok(sqlx::query(
r#"
select
EXISTS (select commitment from unprocessed_identities where commitment = $1) OR
select
EXISTS (select commitment from unprocessed_identities where commitment = $1) OR
EXISTS (select commitment from identities where commitment = $1);
"#,
)
Expand Down Expand Up @@ -894,7 +894,7 @@ mod test {

// TODO: we should probably consolidate all tests that propagate errors to
// TODO: either use anyhow or eyre
async fn setup_db<'a>(docker: &'a Cli) -> anyhow::Result<(Database, DockerContainer)> {
async fn setup_db(docker: &Cli) -> anyhow::Result<(Database, DockerContainer)> {
let db_container = postgres_docker_utils::setup(docker).await?;
let url = format!(
"postgres://postgres:postgres@{}/database",
Expand Down
Loading
Loading