fix lints
This commit is contained in:
@ -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/*
|
||||
|
||||
@ -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}}
|
||||
|
||||
|
||||
@ -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...");
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user