I've done a little refactoring of BytesMut:resize here to increase clarity, handle a few edge cases, and explicitly state soundness assumptions about unsafe code.
As I stated in my commits, this would be nicer with a let-else block, but that isn't currently covered by our MSRV.
I've done a little refactoring of
BytesMut:resize
here to increase clarity, handle a few edge cases, and explicitly state soundness assumptions about unsafe code.As I stated in my commits, this would be nicer with a
let-else
block, but that isn't currently covered by our MSRV.