Closed Sytten closed 5 months ago
Why is x.make_mut()
not the same as x.try_into_mut().unwrap_or_else(|| BytesMut::from(&*x))
?
I mean I guess we could but we already have to handle the copy case in each to_mut vtable function so I dont really see the point in not using that. Plus it there is a small chance that a concurrent thread released the shared since we use acquire vs relaxed ordering.
Sorry I didnt have to work on it more, I will try this week. @braddunbar if you have for a review I would appreciate 🙏
Oh, I missed the notification. Thanks for the ping! I'll take a look.
@braddunbar @Darksonn Gentle ping :) I added the comment and an odd test. Let me know if we want to add more tests.
@Darksonn Done the improvements
@braddunbar @Darksonn Ready for another round :)
Supersede https://github.com/tokio-rs/bytes/pull/687 Closes https://github.com/tokio-rs/bytes/issues/611
This is my first time contributing to bytes and this is quite a change, do let me know if you want more tests.