mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
3ecd18ca37
Align `OsString::truncate` (and the underlying WTF-8 implementation) with `String::truncate` by making it a no-op when `len > self.len()`. Previously, `OsString::truncate` would panic if `len > self.len()`, while `String::truncate` treats such cases as a no-op.