Skip to content

Commit

Permalink
Treat Rust warnings as errors in code quality workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-va committed Nov 26, 2024
1 parent 42ab3fd commit 8b2a053
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion api/src/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Cartesian3>,
id: Option<String>,
Expand Down
2 changes: 1 addition & 1 deletion api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8b2a053

Please sign in to comment.