From 7c9e901c121b4b7191f237ea57d36ff7b305c7c5 Mon Sep 17 00:00:00 2001 From: Riz Ashraf Date: Sat, 10 Oct 2026 11:12:03 +0100 Subject: [PATCH] style: Apply cargo fix for unused variables --- server/src/handlers/graph.rs | 4 ++-- server/src/handlers/meta.rs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/src/handlers/graph.rs b/server/src/handlers/graph.rs index 568c865..0e41ba5 100644 --- a/server/src/handlers/graph.rs +++ b/server/src/handlers/graph.rs @@ -165,7 +165,7 @@ impl McpTool for CreateEntitiesHandler { state.modify_graph(|g| { for entity_input in req.entities { if !entity_input.name.is_empty() { - let mut entity = crate::models::Entity { + let entity = crate::models::Entity { name: entity_input.name.clone(), entity_type: crate::models::normalize_entity_type(&entity_input.entity_type), observations: entity_input.observations, @@ -264,7 +264,7 @@ impl McpTool for CreateRelationsHandler { } for relation_input in req.relations { if !relation_input.from.is_empty() && !relation_input.to.is_empty() { - let mut relation = crate::models::Relation { + let relation = crate::models::Relation { from: relation_input.from, to: relation_input.to, relation_type: crate::models::normalize_relation_type(&relation_input.relation_type), diff --git a/server/src/handlers/meta.rs b/server/src/handlers/meta.rs index efdc4dc..af724ed 100644 --- a/server/src/handlers/meta.rs +++ b/server/src/handlers/meta.rs @@ -609,7 +609,7 @@ impl McpTool for TechDebtHandler { async fn execute(&self, args: Value, state: Arc) -> crate::error::Result { let req: TechDebtTool = serde_json::from_value(args).map_err(|e| e.to_string())?; match req { - TechDebtTool::Log { description, title, ideal_solution, git_commit, git_branch, symbol_references, line_range, namespace, severity, repo_name, file_path, workaround, effort_estimate } => { + TechDebtTool::Log { description, title: _, ideal_solution, git_commit, git_branch, symbol_references: _, line_range, namespace, severity, repo_name, file_path, workaround, effort_estimate } => { let ns = namespace.clone().unwrap_or_else(crate::models::default_namespace); let desc = description; let ideal = ideal_solution.unwrap_or_default(); @@ -1203,7 +1203,7 @@ impl McpTool for ManageCheckpointHandler { Ok(format!("Checkpoint '{}' created successfully.", name)) } - ManageCheckpointTool::Restore { name_or_id, namespace } => { + ManageCheckpointTool::Restore { name_or_id, namespace: _ } => { let name = name_or_id.ok_or_else(|| crate::error::AppError::Internal("name_or_id is required".to_string()))?; let target_dir = state.base_dir.join("checkpoints").join(&name); @@ -1245,7 +1245,7 @@ impl McpTool for ManageCheckpointHandler { Ok(format!("Checkpoint '{}' restored successfully.", name)) } - ManageCheckpointTool::List { namespace } => { + ManageCheckpointTool::List { namespace: _ } => { let mut list = Vec::new(); let checkpoints_dir = state.base_dir.join("checkpoints"); if let Ok(entries) = std::fs::read_dir(&checkpoints_dir) { @@ -1263,7 +1263,7 @@ impl McpTool for ManageCheckpointHandler { } Ok(serde_yaml::to_string(&list)?) } - ManageCheckpointTool::Delete { name_or_id, namespace } => { + ManageCheckpointTool::Delete { name_or_id, namespace: _ } => { let name = name_or_id.ok_or_else(|| crate::error::AppError::Internal("name_or_id is required".to_string()))?; let target_dir = state.base_dir.join("checkpoints").join(&name); if target_dir.exists() { @@ -1483,7 +1483,7 @@ impl McpTool for HypothesesHandler { Ok(format!("Hypothesis '{}' logged successfully.", hyp_id)) } - HypothesesTool::Query { query, task_id, status } => { + HypothesesTool::Query { query, task_id, status: _ } => { let hypotheses = state.code.hypotheses.read_with(|h| h.clone()); let filtered: Vec<_> = hypotheses .into_iter()