mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-18 11:03:09 +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