aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bytes_mut.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bytes_mut.rs b/src/bytes_mut.rs
index 1628a85..d143f60 100644
--- a/src/bytes_mut.rs
+++ b/src/bytes_mut.rs
@@ -726,11 +726,11 @@ impl BytesMut {
}
return;
- } else {
- new_cap = cmp::max(new_cap, original_capacity);
}
}
+ new_cap = cmp::max(new_cap, original_capacity);
+
// Create a new vector to store the data
let mut v = ManuallyDrop::new(Vec::with_capacity(new_cap));