mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-07 23:55:50 +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