mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-19 00:00:12 +02:00
Fix chain remaining_mut(), allowing to chain growing buffer (#488)
This commit is contained in:
+1
-2
@@ -198,8 +198,7 @@ where
|
||||
fn remaining_mut(&self) -> usize {
|
||||
self.a
|
||||
.remaining_mut()
|
||||
.checked_add(self.b.remaining_mut())
|
||||
.unwrap()
|
||||
.saturating_add(self.b.remaining_mut())
|
||||
}
|
||||
|
||||
fn chunk_mut(&mut self) -> &mut UninitSlice {
|
||||
|
||||
Reference in New Issue
Block a user