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:
1 parent
e215720416
commit
02f40604e1
3 files changed
+8
-6
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user