Skip to content

Commit

Permalink
Rename std::ptr::Shared to NonNull
Browse files Browse the repository at this point in the history
`Shared` is now a deprecated `type` alias.

CC rust-lang/rust#27730 (comment)
  • Loading branch information
SimonSapin committed Jan 20, 2018
1 parent 4f88d2a commit 9276182
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use marker;
use mem::{align_of, size_of, needs_drop};
use mem;
use ops::{Deref, DerefMut};
use ptr::{self, Unique, Shared};
use ptr::{self, Unique, NonNull};

use self::BucketState::*;

Expand Down Expand Up @@ -873,7 +873,7 @@ impl<K, V> RawTable<K, V> {
elems_left,
marker: marker::PhantomData,
},
table: Shared::from(self),
table: NonNull::from(self),
marker: marker::PhantomData,
}
}
Expand Down Expand Up @@ -1020,7 +1020,7 @@ impl<K, V> IntoIter<K, V> {

/// Iterator over the entries in a table, clearing the table.
pub struct Drain<'a, K: 'a, V: 'a> {
table: Shared<RawTable<K, V>>,
table: NonNull<RawTable<K, V>>,
iter: RawBuckets<'static, K, V>,
marker: marker::PhantomData<&'a RawTable<K, V>>,
}
Expand Down

0 comments on commit 9276182

Please sign in to comment.