mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 05:26:23 +03:00
d21336ee0a
Being able to index into the bytes of a string encourages poor UTF-8 hygiene. To get a view of `&[u8]` from either a `String` or `&str` slice, use the `as_bytes()` method. Closes #12710. [breaking-change]