diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index d7ff5d52f..49e36b12e 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -253,6 +253,9 @@ jobs: cd api cargo fmt --check - name: Run clippy + env: + # Treat warnings as errors + RUSTFLAGS: "-D warnings" run: | cd api cargo clippy --frozen --quiet diff --git a/api/src/handlers.rs b/api/src/handlers.rs index ca930143d..6b179b539 100644 --- a/api/src/handlers.rs +++ b/api/src/handlers.rs @@ -87,7 +87,7 @@ pub struct Member { #[allow(non_snake_case)] #[serde(rename_all = "camelCase")] pub struct Geometry { - #[serde(rename="type")] + #[serde(rename = "type")] typ: String, positions: Vec, id: Option, diff --git a/api/src/lib.rs b/api/src/lib.rs index c3f8690bc..064f83408 100644 --- a/api/src/lib.rs +++ b/api/src/lib.rs @@ -9,7 +9,7 @@ use axum::{ use clap::Parser; use hyper::header::{ACCEPT, AUTHORIZATION, CONTENT_TYPE}; use sqlx::PgPool; -use tower::{ServiceBuilder}; +use tower::ServiceBuilder; use tower_http::{cors::CorsLayer, trace::TraceLayer}; pub use config::Config;