Byte index slicing like `&text[..100.min(text.len())]` panics when the byte index falls inside a multi-byte UTF-8 character (e.g., Chinese). Changed to `text.chars().take(100).collect::<String>()` for safe character-based truncation.
The file is empty.
Description
Languages
Rust
100%