mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-04 11:17:04 +00:00

Refactor `into_utf8_lossy` to copy valid UTF-8 bytes into the buffer, avoiding double validation of bytes. Add tests that mirror the `String::from_utf8_lossy` tests