diff options
| author | Fenrir <[email protected]> | 2018-01-21 14:06:28 -0700 |
|---|---|---|
| committer | FenrirWolf <[email protected]> | 2018-01-21 19:16:33 -0700 |
| commit | 23be3f4885688e5e0011005e2295c75168854c0a (patch) | |
| tree | dd0850f9c73c489e114a761d5c0757f3dbec3a65 /ctr-std/src/collections/hash/table.rs | |
| parent | Update CI for Rust nightly-2017-12-01 + other fixes (diff) | |
| download | ctru-rs-23be3f4885688e5e0011005e2295c75168854c0a.tar.xz ctru-rs-23be3f4885688e5e0011005e2295c75168854c0a.zip | |
Recreate ctr-std from latest nightly
Diffstat (limited to 'ctr-std/src/collections/hash/table.rs')
| -rw-r--r-- | ctr-std/src/collections/hash/table.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ctr-std/src/collections/hash/table.rs b/ctr-std/src/collections/hash/table.rs index 7e623a0..73bd574 100644 --- a/ctr-std/src/collections/hash/table.rs +++ b/ctr-std/src/collections/hash/table.rs @@ -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::*; @@ -123,9 +123,6 @@ pub struct RawTable<K, V> { marker: marker::PhantomData<(K, V)>, } -unsafe impl<K: Send, V: Send> Send for RawTable<K, V> {} -unsafe impl<K: Sync, V: Sync> Sync for RawTable<K, V> {} - // An unsafe view of a RawTable bucket // Valid indexes are within [0..table_capacity) pub struct RawBucket<K, V> { @@ -876,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, } } @@ -1023,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>>, } |