mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 21:47:15 +03:00
@@ -354,7 +354,7 @@ pub fn reserve(&mut self, used_cap: usize, needed_extra_cap: usize) {
|
||||
// panic.
|
||||
|
||||
// Don't actually need any more capacity.
|
||||
// Wrapping in case they give a bas `used_cap`
|
||||
// Wrapping in case they give a bad `used_cap`
|
||||
if self.cap().wrapping_sub(used_cap) >= needed_extra_cap {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user