fix(server): clippy fixes for Task 4 (CI green)
All checks were successful
All checks were successful
Task 4 (bfcdbb5) compiles and passes all 32 tests on the build host; only
clippy -D warnings blocked CI. Fixed the two denials:
- rate_limit.rs: converted a dangling /// doc block (no documented item) to //
to clear clippy::empty_line_after_doc_comments
- db/events.rs: #[allow(dead_code)] on CONNECTION_REJECTED_EXPIRED_CODE and
_CANCELLED_CODE (not-yet-wired audit-event constants), matching the file's
existing STREAMING_STOPPED pattern; TODO comments note the rejection-event wiring
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -325,12 +325,12 @@ fn too_many_requests(detail: &str, error_code: &str) -> Response {
|
||||
// Axum middleware functions (one per protected route)
|
||||
// ============================================================================
|
||||
|
||||
/// Selects which limiter from [`RateLimitState`] a middleware uses.
|
||||
///
|
||||
/// Each protected route gets its own `from_fn_with_state` middleware pointing at
|
||||
/// the matching limiter; keeping them as distinct functions avoids threading an
|
||||
/// extra "which limiter" parameter through the layer and keeps the wiring in
|
||||
/// `main.rs` self-documenting.
|
||||
// Selects which limiter from `RateLimitState` a middleware uses.
|
||||
//
|
||||
// Each protected route gets its own `from_fn_with_state` middleware pointing at
|
||||
// the matching limiter; keeping them as distinct functions avoids threading an
|
||||
// extra "which limiter" parameter through the layer and keeps the wiring in
|
||||
// `main.rs` self-documenting.
|
||||
|
||||
/// Rate-limit middleware for `POST /api/auth/login`.
|
||||
pub async fn login_rate_limit(
|
||||
|
||||
Reference in New Issue
Block a user