diff --git a/.travis.yml b/.travis.yml index 0e85c20..7d50982 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ rust: - nightly before_script: - - (cargo install mdbook --force || true) + - (cargo install mdbook --force --vers "0.1.7" || true) script: - export PATH=$PATH:/home/travis/.cargo/bin; 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::(), ))