Skip to content

Commit 66ef737

Browse files
authored
Merge pull request #79 from RalfJung/rustup
Fix for Rust changes
2 parents 7a93c08 + d4bc3b5 commit 66ef737

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rust:
66
- nightly
77

88
before_script:
9-
- (cargo install mdbook --force || true)
9+
- (cargo install mdbook --force --vers "0.1.7" || true)
1010

1111
script:
1212
- export PATH=$PATH:/home/travis/.cargo/bin;

src/vec-final.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::ptr::{Unique, NonNull, self};
99
use std::mem;
1010
use std::ops::{Deref, DerefMut};
1111
use std::marker::PhantomData;
12-
use std::alloc::{Alloc, GlobalAlloc, Layout, Global, oom};
12+
use std::alloc::{Alloc, GlobalAlloc, Layout, Global, handle_alloc_error};
1313

1414
struct RawVec<T> {
1515
ptr: Unique<T>,
@@ -47,7 +47,7 @@ impl<T> RawVec<T> {
4747

4848
// If allocate or reallocate fail, oom
4949
if ptr.is_err() {
50-
oom(Layout::from_size_align_unchecked(
50+
handle_alloc_error(Layout::from_size_align_unchecked(
5151
new_cap * elem_size,
5252
mem::align_of::<T>(),
5353
))

0 commit comments

Comments
 (0)