fix for oom rename

pull/79/head
Ralf Jung 6 years ago
parent 435f1da7b2
commit d4bc3b59c5

@ -9,7 +9,7 @@ use std::ptr::{Unique, NonNull, self};
use std::mem;
use std::ops::{Deref, DerefMut};
use std::marker::PhantomData;
use std::alloc::{Alloc, GlobalAlloc, Layout, Global, oom};
use std::alloc::{Alloc, GlobalAlloc, Layout, Global, handle_alloc_error};
struct RawVec<T> {
ptr: Unique<T>,
@ -47,7 +47,7 @@ impl<T> RawVec<T> {
// If allocate or reallocate fail, oom
if ptr.is_err() {
oom(Layout::from_size_align_unchecked(
handle_alloc_error(Layout::from_size_align_unchecked(
new_cap * elem_size,
mem::align_of::<T>(),
))

Loading…
Cancel
Save