3 ms·
If the API cannot be made safe then it must be marked unsafe.
by mlindner 11mo ago
If the API cannot be made safe then it must be marked unsafe.
- deleted 11mo ago[deleted]
- aw1621107 11mo agoI mean, remove() is already marked unsafe? Otherwise there's the question of where exactly the API boundaries are. In the most general case, your unsafe boundary is going to be the module boundary; as long as what you publicly expose is safe modulo bugs, you're good. In this case the fix was in a crate-internal function, so I suppose one could argue that the public API was/is fine. That being said, I'm not super-familiar with the code in question so I can't definitively say that there's no way to make internal changes to reduce the risk of similar errors.