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 37e0622fd..54200cb13 100644 --- a/api/src/handlers.rs +++ b/api/src/handlers.rs @@ -86,7 +86,7 @@ pub struct Member { #[derive(Serialize, Deserialize, Clone, Debug, FromRow)] #[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;