mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-15 00:00:18 +02:00
Keep capacity when unsplit on empty other buf (#502)
This commit is contained in:
+1
-1
@@ -819,7 +819,7 @@ impl BytesMut {
|
||||
}
|
||||
|
||||
fn try_unsplit(&mut self, other: BytesMut) -> Result<(), BytesMut> {
|
||||
if other.is_empty() {
|
||||
if other.capacity() == 0 {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user