You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When chaining two spacious buffers, as in unbounded BytesMut, the remaining and remaining_mut fn both panic due to overflow when adding together the two child remaining. Obviously BytesMut acts as though it is infinite and this happens. I don't know if I'm dumb for chaining two infinite buffers, but it was just the simple way for me to start testing out Bytes and a Chain. The fix is of course simple, just change the unwrap to unwrap_or(usize::MAX).
The text was updated successfully, but these errors were encountered:
When chaining two spacious buffers, as in unbounded BytesMut, the
remaining
andremaining_mut
fn both panic due to overflow when adding together the two childremaining
. Obviously BytesMut acts as though it is infinite and this happens. I don't know if I'm dumb for chaining two infinite buffers, but it was just the simple way for me to start testing out Bytes and a Chain. The fix is of course simple, just change theunwrap
tounwrap_or(usize::MAX)
.The text was updated successfully, but these errors were encountered: