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
+3 -3
View File
@@ -726,10 +726,10 @@ impl BytesMut {
} }
return; 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 // Create a new vector to store the data
let mut v = ManuallyDrop::new(Vec::with_capacity(new_cap)); let mut v = ManuallyDrop::new(Vec::with_capacity(new_cap));