From d4bc3b59c5bbf715b9d82c3800c8f31993810f21 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 16 Jul 2018 15:57:57 +0200 Subject: [PATCH] fix for oom rename --- src/vec-final.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vec-final.md b/src/vec-final.md index b9fd942..4e2daf3 100644 --- a/src/vec-final.md +++ b/src/vec-final.md @@ -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 { ptr: Unique, @@ -47,7 +47,7 @@ impl RawVec { // 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::(), ))