We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dc772e commit 85bd865Copy full SHA for 85bd865
library/alloc/src/vec/spec_extend.rs
@@ -35,9 +35,7 @@ where
35
);
36
}
37
if let Some(additional) = high {
38
- if additional > self.capacity().wrapping_sub(self.len()) {
39
- self.reserve(additional);
40
- }
+ self.reserve(additional);
41
unsafe {
42
let mut ptr = self.as_mut_ptr().add(self.len());
43
let mut local_len = SetLenOnDrop::new(&mut self.len);
0 commit comments