Remove unsafe code

This commit is contained in:
Stjepan Glavina 2020-06-22 18:38:19 +02:00
parent 5bf0077951
commit 788a23aafe
1 changed files with 2 additions and 6 deletions

View File

@ -33,6 +33,7 @@
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
use std::cell::Cell;
use std::fmt;
use std::marker::PhantomData;
use std::sync::atomic::AtomicUsize;
@ -68,11 +69,9 @@ use std::time::{Duration, Instant};
/// ```
pub struct Parker {
unparker: Unparker,
_marker: PhantomData<*const ()>,
_marker: PhantomData<Cell<()>>,
}
unsafe impl Send for Parker {}
impl Parker {
/// Creates a new [`Parker`].
///
@ -226,9 +225,6 @@ pub struct Unparker {
inner: Arc<Inner>,
}
unsafe impl Send for Unparker {}
unsafe impl Sync for Unparker {}
impl Unparker {
/// Atomically makes the token available if it is not already.
///