diff --git a/.gitea/workflows/backend.yaml b/.gitea/workflows/backend.yaml index d0abcfa..a2a3dff 100644 --- a/.gitea/workflows/backend.yaml +++ b/.gitea/workflows/backend.yaml @@ -62,7 +62,7 @@ jobs: - name: Run Tests run: ./scripts/test.sh - name: Upload Test Logs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: nuchat-${{ hashFiles('src/**') }}-${{ hashFiles('tests/**') }}.log path: backend/logs/* diff --git a/backend/Justfile b/backend/Justfile index 713cbc1..f0e1683 100644 --- a/backend/Justfile +++ b/backend/Justfile @@ -13,3 +13,7 @@ test: default := 'run' watch CMD=default: watchexec -w src -r just {{CMD}} + +lint *ARGS: + cargo clippy -- -Dwarnings -Dclippy::correctness -Wclippy::pedantic -Wclippy::perf -Aclippy::missing_errors_doc -Aclippy::missing_panics_doc {{ARGS}} + diff --git a/backend/src/main.rs b/backend/src/main.rs index 1c68980..bb67dfb 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -71,8 +71,8 @@ async fn shutdown_signal(rx: mpsc::Receiver) { let terminate = std::future::pending::<()>(); tokio::select! { - _ = ctrl_c => {}, - _ = terminate => {}, + () = ctrl_c => {}, + () = terminate => {}, _ = endpoint => {}, } info!("Shutting server down gracefully..."); diff --git a/backend/src/router.rs b/backend/src/router.rs index df733dc..d754fe6 100644 --- a/backend/src/router.rs +++ b/backend/src/router.rs @@ -49,7 +49,7 @@ fn admin(tx: mpsc::Sender) -> Router { if let Ok(secret) = std::env::var("ADMIN_SECRET") { println!("ADMIN_SECRET: {secret}"); match req.headers().get("Authorization") { - Some(key) if secret == key.to_owned() => (), + Some(key) if secret == *key => (), _ => { return Response::builder() .status(StatusCode::UNAUTHORIZED)