Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/vec-final.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down Expand Up @@ -47,7 +47,7 @@ impl<T> RawVec<T> {

// If allocate or reallocate fail, oom
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR missed comment modification, see #77

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to submit a comment fix?

Copy link
Member

@mati865 mati865 Jul 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit time-constrained for now, there may be other places to fix.

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>(),
))
Expand Down