No need for PhantomData

This commit is contained in:
ivmarkov 2024-01-14 08:02:38 +00:00
parent 959612bae1
commit 75097fcf51

View File

@ -668,18 +668,15 @@ pub mod embassy_sync {
/// # Safety /// # Safety
/// ///
/// This mutex is safe to share between different executors and interrupts. /// This mutex is safe to share between different executors and interrupts.
pub struct IsrRawMutex { pub struct IsrRawMutex(());
_phantom: PhantomData<()>,
}
unsafe impl Send for IsrRawMutex {} unsafe impl Send for IsrRawMutex {}
unsafe impl Sync for IsrRawMutex {} unsafe impl Sync for IsrRawMutex {}
impl IsrRawMutex { impl IsrRawMutex {
/// Create a new `IsrRawMutex`. /// Create a new `IsrRawMutex`.
pub const fn new() -> Self { pub const fn new() -> Self {
Self { Self(())
_phantom: PhantomData,
}
} }
} }