mirror of
https://github.com/esp-rs/esp-idf-hal.git
synced 2025-09-27 12:21:02 +00:00
No need for PhantomData
This commit is contained in:
parent
959612bae1
commit
75097fcf51
@ -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,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user