fix lints
All checks were successful
Backend Actions / build (push) Successful in 34s
Backend Actions / check (push) Successful in 1m15s
Backend Actions / test (push) Successful in 2m30s

This commit is contained in:
2025-07-22 00:34:23 +01:00
parent 5fe2d7ba79
commit d700822dc8
4 changed files with 8 additions and 4 deletions

View File

@ -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/*

View File

@ -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}}

View File

@ -71,8 +71,8 @@ async fn shutdown_signal(rx: mpsc::Receiver<bool>) {
let terminate = std::future::pending::<()>();
tokio::select! {
_ = ctrl_c => {},
_ = terminate => {},
() = ctrl_c => {},
() = terminate => {},
_ = endpoint => {},
}
info!("Shutting server down gracefully...");

View File

@ -49,7 +49,7 @@ fn admin(tx: mpsc::Sender<bool>) -> 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)