Fix P1 Rust clippy: unused variable _auth_ctx, _jwt_secret, derive Default for RouterBrain
Some checks failed
CI — P1 Route (Rust) / test (push) Failing after 4m22s

This commit is contained in:
2026-03-01 16:56:24 +00:00
parent 1af409ad7e
commit d5a10d9266
3 changed files with 5 additions and 4 deletions

View File

@@ -34,12 +34,12 @@ pub trait AuthProvider: Send + Sync {
/// Local auth — bcrypt passwords + HS256 JWT (self-hosted mode) /// Local auth — bcrypt passwords + HS256 JWT (self-hosted mode)
pub struct LocalAuthProvider { pub struct LocalAuthProvider {
pool: sqlx::PgPool, pool: sqlx::PgPool,
jwt_secret: String, _jwt_secret: String,
redis: deadpool_redis::Pool, redis: deadpool_redis::Pool,
} }
impl LocalAuthProvider { impl LocalAuthProvider {
pub fn new(pool: sqlx::PgPool, jwt_secret: String, redis: deadpool_redis::Pool) -> Self { pub fn new(pool: sqlx::PgPool, _jwt_secret: String, redis: deadpool_redis::Pool) -> Self {
Self { pool, jwt_secret, redis } Self { pool, jwt_secret, redis }
} }
} }

View File

@@ -43,7 +43,7 @@ async fn proxy_chat_completions(
body: String, body: String,
) -> Result<Response, ProxyError> { ) -> Result<Response, ProxyError> {
// 1. Authenticate // 1. Authenticate
let auth_ctx = state.auth.authenticate(&headers).await?; let _auth_ctx = state.auth.authenticate(let auth_ctx = state.auth.authenticate(&headers).await?;headers).await?;
// 2. Parse request // 2. Parse request
let mut request: serde_json::Value = let mut request: serde_json::Value =
@@ -148,7 +148,7 @@ async fn proxy_embeddings(
body: String, body: String,
) -> Result<Response, ProxyError> { ) -> Result<Response, ProxyError> {
// Embeddings don't need routing — pass through directly // Embeddings don't need routing — pass through directly
let auth_ctx = state.auth.authenticate(&headers).await?; let _auth_ctx = state.auth.authenticate(let auth_ctx = state.auth.authenticate(&headers).await?;headers).await?;
let provider = "openai".to_string(); let provider = "openai".to_string();
let upstream_url = state.config.provider_url(&provider); let upstream_url = state.config.provider_url(&provider);

View File

@@ -19,6 +19,7 @@ pub enum Complexity {
} }
/// The Router Brain — evaluates request complexity and applies routing rules /// The Router Brain — evaluates request complexity and applies routing rules
#[derive(Default)]
pub struct RouterBrain { pub struct RouterBrain {
// In V1, rules are loaded from config. Later: from DB per org. // In V1, rules are loaded from config. Later: from DB per org.
} }