mirror of https://github.com/smol-rs/parking
Remove unsafe code
This commit is contained in:
parent
5bf0077951
commit
788a23aafe
|
@ -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.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue