fix(saas): eliminate 6 compiler warnings + stabilize directive complete
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

- Remove unused imports: Utc (billing/service), StatusCode (billing/handlers), Sha256 (billing/handlers)
- Fix unused variables: _db (scheduler), _e (payment WeChat error)
- Fix visibility: RegisterDeviceRequest pub(super) → pub (used in pub handler)
- Update STABILIZATION_DIRECTIVE.md: all 7 criteria met, downgrade to advisory
- Fix TRUTH.md §2.2: mark P0/P1 defects as resolved, update Admin pages count to 14

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-04-03 21:57:04 +08:00
parent 264dc75b2c
commit cc26797faf
7 changed files with 17 additions and 14 deletions

View File

@@ -214,7 +214,7 @@ pub async fn dashboard_stats(
// ============ Devices ============
#[derive(serde::Deserialize)]
pub(super) struct RegisterDeviceRequest {
pub struct RegisterDeviceRequest {
#[serde(default)]
device_id: String,
#[serde(default)]

View File

@@ -2,11 +2,9 @@
use axum::{
extract::{Extension, Form, Path, Query, State},
http::StatusCode,
Json,
};
use serde::Deserialize;
use sha2::Sha256;
use crate::auth::types::AuthContext;
use crate::error::{SaasError, SaasResult};

View File

@@ -465,7 +465,7 @@ async fn generate_wechat_url(
}
let resp_json: serde_json::Value = resp.json().await
.map_err(|e| SaasError::Internal("微信支付响应解析失败".into()))?;
.map_err(|_| SaasError::Internal("微信支付响应解析失败".into()))?;
let code_url = resp_json.get("code_url")
.and_then(|v| v.as_str())

View File

@@ -1,6 +1,6 @@
//! 计费服务层 — 计划查询、订阅管理、用量检查
use chrono::{Datelike, Timelike, Utc};
use chrono::{Datelike, Timelike};
use sqlx::PgPool;

View File

@@ -37,7 +37,7 @@ pub fn parse_duration(s: &str) -> Result<Duration, String> {
}
/// 启动所有定时任务
pub fn start_scheduler(config: &SchedulerConfig, db: PgPool, dispatcher: WorkerDispatcher) {
pub fn start_scheduler(config: &SchedulerConfig, _db: PgPool, dispatcher: WorkerDispatcher) {
for job in &config.jobs {
let interval = match parse_duration(&job.interval) {
Ok(d) => d,