perf: fix slice boundary panics, eliminate string allocation in stdio reader, fix lua table nesting bug, and optimize nvim socket chunk size

This commit is contained in:
Riz Ashraf committed 2026-09-22 05:51:15 +01:00
1 parent e215720416
commit 02f40604e1
3 files changed
+8 -6

No files matched your search

+3 -1
View File
@@ -14,7 +14,9 @@ pub async fn read_mcp_message<R: tokio::io::AsyncRead + Unpin>(
}
if line.starts_with('{') {
return Some(line.trim_end().to_string());
let len = line.trim_end().len();
line.truncate(len);
return Some(line);
}
let line = line.trim_end();