From 78e94c6aeae711b7c0fd3aae9e55d2a567790edb Mon Sep 17 00:00:00 2001 From: Riz Ashraf Date: Tue, 22 Sep 2026 04:41:14 +0100 Subject: [PATCH] chore: remove unused variables and tracing dependency in nvim-core --- nvim-core/src/lib.rs | 22 +--------------------- server/tests/parity_test.rs | 4 ++-- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/nvim-core/src/lib.rs b/nvim-core/src/lib.rs index dc181d6..cfbaea7 100644 --- a/nvim-core/src/lib.rs +++ b/nvim-core/src/lib.rs @@ -524,20 +524,7 @@ pub async fn run_mcp_loop(app_name: &str, app_version: &str) { let app_version = app_version.to_string(); tokio::spawn(async move { - let id = msg.id.clone().unwrap_or(json!(null)); - let id_clone = id.clone(); - let start_time = std::time::Instant::now(); - let method_clone = if msg.method == "tools/call" { - let tool_name = msg - .params - .as_ref() - .and_then(|p| p.get("name")) - .and_then(|n| n.as_str()) - .unwrap_or("unknown"); - format!("ToolCall[{tool_name}]") - } else { - msg.method.clone() - }; + let id = msg.id.unwrap_or(json!(null)); match msg.method.as_str() { "initialize" => { @@ -1026,13 +1013,6 @@ pub async fn run_mcp_loop(app_name: &str, app_version: &str) { } } } - let elapsed = start_time.elapsed(); - tracing::info!( - "<<< [Nvim] {} (id: {}) completed in {:?}", - method_clone, - id_clone, - elapsed - ); }); } } diff --git a/server/tests/parity_test.rs b/server/tests/parity_test.rs index 2f0fa2e..503def2 100644 --- a/server/tests/parity_test.rs +++ b/server/tests/parity_test.rs @@ -4,8 +4,8 @@ use std::collections::HashSet; fn test_eager_tools_parity() { // 1. Read handlers_v2/*.rs to get memory tools let mut memory_tools = HashSet::new(); - let entries = std::fs::read_dir("src/handlers_v2").expect("Failed to read handlers_v2 dir"); - for entry in entries { + let v2_handlers_dir = std::fs::read_dir("src/handlers").expect("Failed to read handlers dir"); + for entry in v2_handlers_dir { let entry = entry.unwrap(); if entry.path().extension().unwrap_or_default() == "rs" { let memory_source = std::fs::read_to_string(entry.path()).unwrap();