story-kit: merge 158_bug_pty_debug_log_panics_on_multi_byte_utf_8_characters
This commit is contained in:
@@ -246,10 +246,11 @@ fn run_pty_session(
|
||||
continue;
|
||||
}
|
||||
|
||||
slog!(
|
||||
"[pty-debug] processing: {}...",
|
||||
&trimmed[..trimmed.len().min(120)]
|
||||
);
|
||||
let mut end = trimmed.len().min(120);
|
||||
while !trimmed.is_char_boundary(end) {
|
||||
end -= 1;
|
||||
}
|
||||
slog!("[pty-debug] processing: {}...", &trimmed[..end]);
|
||||
|
||||
// Try to parse as JSON
|
||||
if let Ok(json) = serde_json::from_str::<serde_json::Value>(trimmed)
|
||||
|
||||
Reference in New Issue
Block a user