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

+2 -2
View File
@@ -98,7 +98,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
">>> [Stub] Forwarding {} to server (length: {}): {}{}",
log_prefix,
msg.len(),
&msg[..std::cmp::min(msg.len(), 1000)],
&msg[..msg.floor_char_boundary(1000)],
if msg.len() > 1000 { "..." } else { "" }
);
if write
@@ -120,7 +120,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
"<<< [Stub] Received {} from server (length: {}): {}{}",
log_prefix,
text.len(),
&text[..std::cmp::min(text.len(), 1000)],
&text[..text.floor_char_boundary(1000)],
if text.len() > 1000 { "..." } else { "" }
);
use tokio::io::AsyncWriteExt;