Merge pull request #236 from ehuss/fix-layout-grow

Fix API change to alloc::Global::grow.
pull/238/head
Mark Rousskov 4 years ago committed by GitHub
commit 6e57e64501
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -47,7 +47,7 @@ impl<T> RawVec<T> {
let c: NonNull<T> = self.ptr.into(); let c: NonNull<T> = self.ptr.into();
let ptr = Global.grow(c.cast(), let ptr = Global.grow(c.cast(),
Layout::array::<T>(self.cap).unwrap(), Layout::array::<T>(self.cap).unwrap(),
Layout::array::<T>(new_cap).unwrap().size()); Layout::array::<T>(new_cap).unwrap());
(new_cap, ptr) (new_cap, ptr)
}; };

Loading…
Cancel
Save