diff --git a/apps/desktop/src-tauri/src/data/repositories/custom_tag_repository.rs b/apps/desktop/src-tauri/src/data/repositories/custom_tag_repository.rs index 4340d96..f9fd291 100644 --- a/apps/desktop/src-tauri/src/data/repositories/custom_tag_repository.rs +++ b/apps/desktop/src-tauri/src/data/repositories/custom_tag_repository.rs @@ -301,10 +301,10 @@ impl CustomTagRepository { let updated_at_str: String = row.get(8)?; let created_at = DateTime::parse_from_rfc3339(&created_at_str) - .map_err(|e| rusqlite::Error::InvalidColumnType(7, "created_at".to_string(), rusqlite::types::Type::Text))? + .map_err(|_e| rusqlite::Error::InvalidColumnType(7, "created_at".to_string(), rusqlite::types::Type::Text))? .with_timezone(&Utc); let updated_at = DateTime::parse_from_rfc3339(&updated_at_str) - .map_err(|e| rusqlite::Error::InvalidColumnType(8, "updated_at".to_string(), rusqlite::types::Type::Text))? + .map_err(|_e| rusqlite::Error::InvalidColumnType(8, "updated_at".to_string(), rusqlite::types::Type::Text))? .with_timezone(&Utc); Ok(CustomTagCategory { @@ -326,10 +326,10 @@ impl CustomTagRepository { let updated_at_str: String = row.get(offset + 8)?; let created_at = DateTime::parse_from_rfc3339(&created_at_str) - .map_err(|e| rusqlite::Error::InvalidColumnType(offset + 7, "created_at".to_string(), rusqlite::types::Type::Text))? + .map_err(|_e| rusqlite::Error::InvalidColumnType(offset + 7, "created_at".to_string(), rusqlite::types::Type::Text))? .with_timezone(&Utc); let updated_at = DateTime::parse_from_rfc3339(&updated_at_str) - .map_err(|e| rusqlite::Error::InvalidColumnType(offset + 8, "updated_at".to_string(), rusqlite::types::Type::Text))? + .map_err(|_e| rusqlite::Error::InvalidColumnType(offset + 8, "updated_at".to_string(), rusqlite::types::Type::Text))? .with_timezone(&Utc); Ok(CustomTagCategory { @@ -351,10 +351,10 @@ impl CustomTagRepository { let updated_at_str: String = row.get(9)?; let created_at = DateTime::parse_from_rfc3339(&created_at_str) - .map_err(|e| rusqlite::Error::InvalidColumnType(8, "created_at".to_string(), rusqlite::types::Type::Text))? + .map_err(|_e| rusqlite::Error::InvalidColumnType(8, "created_at".to_string(), rusqlite::types::Type::Text))? .with_timezone(&Utc); let updated_at = DateTime::parse_from_rfc3339(&updated_at_str) - .map_err(|e| rusqlite::Error::InvalidColumnType(9, "updated_at".to_string(), rusqlite::types::Type::Text))? + .map_err(|_e| rusqlite::Error::InvalidColumnType(9, "updated_at".to_string(), rusqlite::types::Type::Text))? .with_timezone(&Utc); Ok(CustomTag { diff --git a/apps/desktop/src-tauri/src/data/repositories/material_repository.rs b/apps/desktop/src-tauri/src/data/repositories/material_repository.rs index e7e8a12..012bc8a 100644 --- a/apps/desktop/src-tauri/src/data/repositories/material_repository.rs +++ b/apps/desktop/src-tauri/src/data/repositories/material_repository.rs @@ -251,7 +251,7 @@ impl MaterialRepository { })?; let mut segments = Vec::new(); - for (index, segment) in segment_iter.enumerate() { + for (_index, segment) in segment_iter.enumerate() { let segment = segment?; segments.push(segment); } diff --git a/apps/desktop/src-tauri/src/presentation/commands/material_usage_commands.rs b/apps/desktop/src-tauri/src/presentation/commands/material_usage_commands.rs index 43289a7..da744e0 100644 --- a/apps/desktop/src-tauri/src/presentation/commands/material_usage_commands.rs +++ b/apps/desktop/src-tauri/src/presentation/commands/material_usage_commands.rs @@ -1,4 +1,4 @@ -use std::sync::Arc; +// use std::sync::Arc; // 未使用的导入 use tauri::State; use crate::app_state::AppState; diff --git a/apps/desktop/src-tauri/src/presentation/commands/model_dynamic_commands.rs b/apps/desktop/src-tauri/src/presentation/commands/model_dynamic_commands.rs index e73a037..9d9de30 100644 --- a/apps/desktop/src-tauri/src/presentation/commands/model_dynamic_commands.rs +++ b/apps/desktop/src-tauri/src/presentation/commands/model_dynamic_commands.rs @@ -106,7 +106,7 @@ pub async fn get_model_dynamic_stats( /// 重新生成视频命令 #[command] pub async fn regenerate_dynamic_video( - state: State<'_, AppState>, + _state: State<'_, AppState>, dynamic_id: String, video_id: String, ) -> Result<(), String> { diff --git a/apps/desktop/src-tauri/src/presentation/commands/outfit_search_commands.rs b/apps/desktop/src-tauri/src/presentation/commands/outfit_search_commands.rs index 0c825f2..c38b806 100644 --- a/apps/desktop/src-tauri/src/presentation/commands/outfit_search_commands.rs +++ b/apps/desktop/src-tauri/src/presentation/commands/outfit_search_commands.rs @@ -13,7 +13,7 @@ use crate::infrastructure::gemini_service::{GeminiService, GeminiConfig}; /// 遵循 Tauri 开发规范的命令接口设计原则 #[tauri::command] pub async fn analyze_outfit_image( - state: State<'_, AppState>, + _state: State<'_, AppState>, request: AnalyzeImageRequest, ) -> Result { // 创建Gemini服务 @@ -44,8 +44,8 @@ pub async fn analyze_outfit_image( /// 搜索相似服装 #[tauri::command] pub async fn search_similar_outfits( - state: State<'_, AppState>, - request: SearchRequest, + _state: State<'_, AppState>, + _request: SearchRequest, ) -> Result { // TODO: 实现真实的搜索逻辑 @@ -63,7 +63,7 @@ pub async fn search_similar_outfits( /// LLM问答 #[tauri::command] pub async fn ask_llm_outfit_advice( - state: State<'_, AppState>, + _state: State<'_, AppState>, request: LLMQueryRequest, ) -> Result { // 创建Gemini服务 @@ -103,7 +103,7 @@ pub async fn get_outfit_search_suggestions( #[tauri::command] pub async fn generate_search_config_from_analysis( _state: State<'_, AppState>, - analysis_result: crate::data::models::gemini_analysis::OutfitAnalysisResult, + _analysis_result: crate::data::models::gemini_analysis::OutfitAnalysisResult, ) -> Result { // TODO: 实现基于分析结果生成搜索配置的逻辑 // 暂时返回默认配置 diff --git a/apps/desktop/src-tauri/src/presentation/commands/project_template_binding_commands.rs b/apps/desktop/src-tauri/src/presentation/commands/project_template_binding_commands.rs index 9e886c3..f74e4ae 100644 --- a/apps/desktop/src-tauri/src/presentation/commands/project_template_binding_commands.rs +++ b/apps/desktop/src-tauri/src/presentation/commands/project_template_binding_commands.rs @@ -96,12 +96,12 @@ pub async fn list_project_template_bindings( /// 获取项目的模板列表 #[tauri::command] pub async fn get_templates_by_project( - projectId: String, + project_id: String, state: State<'_, AppState>, ) -> Result, String> { let service = create_service(&state)?; - service.get_templates_by_project(&projectId) + service.get_templates_by_project(&project_id) .await .map_err(|e| e.to_string()) } @@ -109,12 +109,12 @@ pub async fn get_templates_by_project( /// 获取模板的项目列表 #[tauri::command] pub async fn get_projects_by_template( - templateId: String, + template_id: String, state: State<'_, AppState>, ) -> Result, String> { let service = create_service(&state)?; - service.get_projects_by_template(&templateId) + service.get_projects_by_template(&template_id) .await .map_err(|e| e.to_string()) } @@ -174,12 +174,12 @@ pub async fn deactivate_project_template_binding( /// 获取项目的主要模板绑定 #[tauri::command] pub async fn get_primary_template_binding_for_project( - projectId: String, + project_id: String, state: State<'_, AppState>, ) -> Result, String> { let service = create_service(&state)?; - service.get_primary_binding_for_project(&projectId) + service.get_primary_binding_for_project(&project_id) .await .map_err(|e| e.to_string()) } @@ -187,13 +187,13 @@ pub async fn get_primary_template_binding_for_project( /// 设置项目的主要模板 #[tauri::command] pub async fn set_primary_template_for_project( - projectId: String, - templateId: String, + project_id: String, + template_id: String, state: State<'_, AppState>, ) -> Result { let service = create_service(&state)?; - service.set_primary_template(&projectId, &templateId) + service.set_primary_template(&project_id, &template_id) .await .map_err(|e| e.to_string()) }