Add missing allocation guard in `RawVec::grow`
This commit is contained in:
parent
c49f28005d
commit
89ed59d884
|
@ -520,6 +520,7 @@ impl<T, A: AllocRef> RawVec<T, A> {
|
|||
Layout::array::<T>(cap).map_err(|_| CapacityOverflow)?
|
||||
}
|
||||
};
|
||||
alloc_guard(new_layout.size())?;
|
||||
|
||||
let memory = if let Some((ptr, old_layout)) = self.current_memory() {
|
||||
debug_assert_eq!(old_layout.align(), new_layout.align());
|
||||
|
|
Loading…
Reference in New Issue