4 ms·
> But changing a &str to be invalid UTF-8 isn't inherently a memory-unsafe operation. It kind of is related though since there are APIs that do unsafe things b
by Manishearth 10y ago
> But changing a &str to be invalid UTF-8 isn't inherently a memory-unsafe operation.
It kind of is related though since there are APIs that do unsafe things based on this assumption, IIRC.
The type has some guarantees, and while the guarantees aren't related to memory safety, breaking them will cause memory safety issues.