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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
slog!(
|
let mut end = trimmed.len().min(120);
|
||||||
"[pty-debug] processing: {}...",
|
while !trimmed.is_char_boundary(end) {
|
||||||
&trimmed[..trimmed.len().min(120)]
|
end -= 1;
|
||||||
);
|
}
|
||||||
|
slog!("[pty-debug] processing: {}...", &trimmed[..end]);
|
||||||
|
|
||||||
// Try to parse as JSON
|
// Try to parse as JSON
|
||||||
if let Ok(json) = serde_json::from_str::<serde_json::Value>(trimmed)
|
if let Ok(json) = serde_json::from_str::<serde_json::Value>(trimmed)
|
||||||
|
|||||||
Reference in New Issue
Block a user