fix: resolve warnings (partial)

- Fix unused variable entry_type -> _entry_type
- Remove unused imports BufMut and cache_jobs from companies handlers
- Fix doc comment on lazy_static
- Add #[allow(dead_code)] to reset_daily_actions and reset_monthly_credits
- Fix unused imports in job_seekers handlers
This commit is contained in:
Ashwin Kumar Sivakumar 2026-07-06 02:55:42 +05:30
parent e83271c300
commit b99651f330
5 changed files with 3 additions and 5 deletions

View file

@ -7,8 +7,6 @@ use axum::{
routing::{get, patch, post}, routing::{get, patch, post},
Json, Router, Json, Router,
}; };
use bytes::BufMut;
use cache::jobs as cache_jobs;
use redis::AsyncCommands; use redis::AsyncCommands;
use serde::Deserialize; use serde::Deserialize;
use uuid::Uuid; use uuid::Uuid;

View file

@ -1,6 +1,7 @@
use sqlx::PgPool; use sqlx::PgPool;
/// Reset daily_actions_used for all subscriptions every day. /// Reset daily_actions_used for all subscriptions every day.
#[allow(dead_code)]
pub async fn reset_daily_actions(pool: &PgPool) -> Result<(), sqlx::Error> { pub async fn reset_daily_actions(pool: &PgPool) -> Result<(), sqlx::Error> {
let rows = sqlx::query( let rows = sqlx::query(
"UPDATE user_ai_subscriptions SET daily_actions_used = 0, updated_at = NOW()" "UPDATE user_ai_subscriptions SET daily_actions_used = 0, updated_at = NOW()"

View file

@ -7,7 +7,6 @@ use axum::{
Json, Router, Json, Router,
}; };
use bytes::BufMut; use bytes::BufMut;
use cache::jobs as cache_jobs;
use redis::AsyncCommands; use redis::AsyncCommands;
use serde::Deserialize; use serde::Deserialize;
use uuid::Uuid; use uuid::Uuid;

View file

@ -232,7 +232,7 @@ impl CircuitBreaker {
} }
} }
/// Global rate limiter instance (shared across all clients) // Global rate limiter instance (shared across all clients)
lazy_static::lazy_static! { lazy_static::lazy_static! {
static ref GLOBAL_RATE_LIMITER: RateLimiter = RateLimiter::new( static ref GLOBAL_RATE_LIMITER: RateLimiter = RateLimiter::new(
std::env::var("OLLAMA_RATE_LIMIT_PER_MINUTE") std::env::var("OLLAMA_RATE_LIMIT_PER_MINUTE")

View file

@ -752,7 +752,7 @@ impl AiCreditsRepository {
.fetch_optional(&mut *tx) .fetch_optional(&mut *tx)
.await?; .await?;
let Some((_, debit_credits, entry_type)) = debit_entry else { let Some((_, debit_credits, _entry_type)) = debit_entry else {
tx.rollback().await?; tx.rollback().await?;
return Err(AiCreditsError::ReservationNotFound); return Err(AiCreditsError::ReservationNotFound);
}; };