Fix P1 Rust: remove all unused imports, variables, and fields across api/worker bins
Some checks failed
CI — P1 Route (Rust) / test (push) Failing after 3m48s

This commit is contained in:
2026-03-01 17:15:31 +00:00
parent 6e044809d4
commit 4b6292e0c3
4 changed files with 11 additions and 13 deletions

View File

@@ -2,7 +2,7 @@ use axum::{
extract::{Path, Query, State},
http::{HeaderMap, StatusCode},
response::IntoResponse,
routing::{get, post, put, delete},
routing::{get, put, delete},
Json, Router,
};
use serde::{Deserialize, Serialize};
@@ -16,7 +16,7 @@ pub struct ApiState {
pub auth: Arc<dyn AuthProvider>,
pub pg_pool: sqlx::PgPool,
pub ts_pool: sqlx::PgPool,
pub config: Arc<AppConfig>,
pub _config: Arc<AppConfig>,
}
pub fn create_api_router(state: Arc<ApiState>) -> Router {
@@ -47,7 +47,7 @@ async fn health() -> &'static str { "ok" }
#[derive(Deserialize)]
pub struct TimeRange {
pub from: Option<String>,
pub to: Option<String>,
pub _to: Option<String>,
pub interval: Option<String>, // "hour" or "day"
}
@@ -76,7 +76,7 @@ async fn get_analytics_summary(
Query(range): Query<TimeRange>,
) -> Result<Json<AnalyticsSummary>, ApiError> {
let auth = state.auth.authenticate(&headers).await?;
let from = range.from.unwrap_or_else(|| "now() - interval '7 days'".to_string());
let _from = range.from.unwrap_or_else(|| "now() - interval '7 days'".to_string());
let row = sqlx::query_as::<_, (i64, f64, f64, f64, i32, i32, i64, i64, i64)>(
"SELECT
@@ -494,7 +494,6 @@ async fn upsert_provider(
.unwrap_or_else(|_| vec![0u8; 32]);
use aes_gcm::{Aes256Gcm, KeyInit, aead::Aead};
use aes_gcm::aead::OsRng;
use aes_gcm::Nonce;
let cipher = Aes256Gcm::new_from_slice(&key_bytes)