aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Brad Dunbar <dunbarb2@gmail.com> 2024-01-28 05:50:56 -0500
committerGravatar GitHub <noreply@github.com> 2024-01-28 14:20:56 +0330
commit9257a6ea0852c03f4672e5f8346d3d614543e270 (patch)
treed4e5e92cdf007cf07b27f0e1e784c357e0f04e21 /src
parent0ba3b4c4cd74a0ad8566277e1a1533fa9e895756 (diff)
downloadbytes-9257a6ea0852c03f4672e5f8346d3d614543e270.tar.gz
bytes-9257a6ea0852c03f4672e5f8346d3d614543e270.tar.zst
bytes-9257a6ea0852c03f4672e5f8346d3d614543e270.zip
Remove an unnecessary else branch (#662)
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));