aboutsummaryrefslogtreecommitdiff
path: root/ctr-std/src/collections/hash/table.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ctr-std/src/collections/hash/table.rs')
-rw-r--r--ctr-std/src/collections/hash/table.rs9
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>>,
}