Remove an unnecessary else branch (#662)

This commit is contained in:
Brad Dunbar
2024-01-28 14:20:56 +03:30
committed by GitHub
parent 0ba3b4c4cd
commit 9257a6ea08
+2 -2
View File
@@ -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));