From 75097fcf512aff484d871bf9bf29fc04a6228d88 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Sun, 14 Jan 2024 08:02:38 +0000 Subject: [PATCH] No need for PhantomData --- src/interrupt.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/interrupt.rs b/src/interrupt.rs index 0431a9e6a..d137fa72d 100644 --- a/src/interrupt.rs +++ b/src/interrupt.rs @@ -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(()) } }