chore: remove unused variables and tracing dependency in nvim-core

This commit is contained in:
Riz Ashraf committed 2026-09-22 04:41:14 +01:00
1 parent f76d8ccce8
commit 78e94c6aea
2 files changed
+3 -23

No files matched your search

+1 -21
View File
@@ -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
);
});
}
}
+2 -2
View File
@@ -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();