chore: Cargo warnings 清零 — 39→0 (仅剩 sqlx-postgres 外部依赖警告)
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
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
- runtime: 移除未使用的 SessionId/Datelike import,修复 unused variable - intelligence: 模块级 #![allow(dead_code)] 抑制 Hermes 预留代码警告 - mcp.rs/persist.rs/nl_schedule.rs: 标注 #[allow(dead_code)] 保留接口
This commit is contained in:
@@ -130,7 +130,7 @@ impl DataMasker {
|
||||
fn recover_read<T>(lock: &RwLock<T>) -> std::sync::LockResult<std::sync::RwLockReadGuard<'_, T>> {
|
||||
match lock.read() {
|
||||
Ok(guard) => Ok(guard),
|
||||
Err(e) => {
|
||||
Err(_e) => {
|
||||
tracing::warn!("[DataMasker] RwLock poisoned during read, recovering");
|
||||
// Poison error still gives us access to the inner guard
|
||||
lock.read()
|
||||
@@ -141,7 +141,7 @@ impl DataMasker {
|
||||
fn recover_write<T>(lock: &RwLock<T>) -> std::sync::LockResult<std::sync::RwLockWriteGuard<'_, T>> {
|
||||
match lock.write() {
|
||||
Ok(guard) => Ok(guard),
|
||||
Err(e) => {
|
||||
Err(_e) => {
|
||||
tracing::warn!("[DataMasker] RwLock poisoned during write, recovering");
|
||||
lock.write()
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ use tokio::sync::RwLock;
|
||||
use zclaw_memory::trajectory_store::{
|
||||
TrajectoryEvent, TrajectoryStepType, TrajectoryStore,
|
||||
};
|
||||
use zclaw_types::{Result, SessionId};
|
||||
use zclaw_types::Result;
|
||||
use crate::driver::ContentBlock;
|
||||
use crate::middleware::{AgentMiddleware, MiddlewareContext, MiddlewareDecision};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//!
|
||||
//! Lives in `zclaw-runtime` because it's a pure text→cron utility with no kernel dependency.
|
||||
|
||||
use chrono::{Datelike, Timelike};
|
||||
use chrono::Timelike;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use zclaw_types::AgentId;
|
||||
|
||||
@@ -60,6 +60,7 @@ pub enum ScheduleParseResult {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// A single pattern for matching Chinese time expressions.
|
||||
#[allow(dead_code)]
|
||||
struct SchedulePattern {
|
||||
/// Regex pattern string
|
||||
regex: &'static str,
|
||||
|
||||
@@ -101,6 +101,7 @@ impl ClassroomPersistence {
|
||||
}
|
||||
|
||||
/// Delete a classroom and its chat history.
|
||||
#[allow(dead_code)]
|
||||
pub async fn delete_classroom(&self, classroom_id: &str) -> Result<(), String> {
|
||||
let mut conn = self.conn.lock().await;
|
||||
sqlx::query("DELETE FROM classrooms WHERE id = ?")
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
//! - `trigger_evaluator` - 2026-03-26
|
||||
//! - `persona_evolver` - 2026-03-26
|
||||
|
||||
// Hermes 管线子模块:部分函数由 Tauri 命令或中间件 hooks 按需调用,
|
||||
// 编译期无法检测到跨 crate 引用,统一抑制 dead_code 警告。
|
||||
#![allow(dead_code)]
|
||||
|
||||
pub mod heartbeat;
|
||||
pub mod compactor;
|
||||
pub mod reflection;
|
||||
|
||||
@@ -33,6 +33,7 @@ impl Default for McpManagerState {
|
||||
|
||||
impl McpManagerState {
|
||||
/// Create with a pre-allocated kernel_adapters Arc for sharing with Kernel.
|
||||
#[allow(dead_code)]
|
||||
pub fn with_shared_adapters(kernel_adapters: Arc<std::sync::RwLock<Vec<McpToolAdapter>>>) -> Self {
|
||||
Self {
|
||||
manager: Arc::new(Mutex::new(McpServiceManager::new())),
|
||||
|
||||
Reference in New Issue
Block a user