1
Fork 0
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
This commit is contained in:
Alphyr 2021-08-07 18:57:48 +02:00 committed by Benoît du Garreau
parent d3e2ffcbc6
commit fe7d7c2004

View file

@ -428,7 +428,7 @@ impl<T, A: Allocator> RawVec<T, A> {
let ptr = unsafe {
// `Layout::array` cannot overflow here because it would have
// owerflown earlier when capacity was larger.
// overflowed earlier when capacity was larger.
let new_layout = Layout::array::<T>(cap).unwrap_unchecked();
self.alloc
.shrink(ptr, layout, new_layout)