tokio-rs / bytes

Utilities for working with bytes
MIT License
1.91k stars 286 forks source link

`BufMut` does not include safety invariants in trait documentation #664

Open djkoloski opened 9 months ago

djkoloski commented 9 months ago

BufMut is unsafe to implement, but there are no safety requirements telling users what they need to ensure for their implementations to be sound. It looks like https://github.com/tokio-rs/bytes/issues/329 lists out the requirements, so they may just need to be translated into documentation.

Darksonn commented 9 months ago

Yes, it looks like you are correct.