4 ms·
> You shouldn't misuse unsafe Rust to create `&str` or `String` with invalid UTF-8. Sorry - I think my comment wasn't clear. The point of from_utf8_unchecked i
by josephg 3y ago
> You shouldn't misuse unsafe Rust to create `&str` or `String` with invalid UTF-8.
Sorry - I think my comment wasn't clear. The point of from_utf8_unchecked isn't to create strings with invalid UTF8. The point is that if you know that your string has already been validated, you can skip re-validating it.