mirror of
https://github.com/esp-rs/esp-idf-hal.git
synced 2025-09-27 04:10:30 +00:00
No need for PhantomData
This commit is contained in:
parent
959612bae1
commit
75097fcf51
@ -668,18 +668,15 @@ pub mod embassy_sync {
|
||||
/// # Safety
|
||||
///
|
||||
/// This mutex is safe to share between different executors and interrupts.
|
||||
pub struct IsrRawMutex {
|
||||
_phantom: PhantomData<()>,
|
||||
}
|
||||
pub struct IsrRawMutex(());
|
||||
|
||||
unsafe impl Send for IsrRawMutex {}
|
||||
unsafe impl Sync for IsrRawMutex {}
|
||||
|
||||
impl IsrRawMutex {
|
||||
/// Create a new `IsrRawMutex`.
|
||||
pub const fn new() -> Self {
|
||||
Self {
|
||||
_phantom: PhantomData,
|
||||
}
|
||||
Self(())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user