diff options
| -rw-r--r-- | embassy-sync/src/signal.rs | 9 | ||||
| -rw-r--r-- | embassy-sync/src/waitqueue/waker.rs | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/embassy-sync/src/signal.rs b/embassy-sync/src/signal.rs index c3c10a8af..bea67d8be 100644 --- a/embassy-sync/src/signal.rs +++ b/embassy-sync/src/signal.rs | |||
| @@ -56,6 +56,15 @@ where | |||
| 56 | } | 56 | } |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | impl<M, T> Default for Signal<M, T> | ||
| 60 | where | ||
| 61 | M: RawMutex, | ||
| 62 | { | ||
| 63 | fn default() -> Self { | ||
| 64 | Self::new() | ||
| 65 | } | ||
| 66 | } | ||
| 67 | |||
| 59 | impl<M, T: Send> Signal<M, T> | 68 | impl<M, T: Send> Signal<M, T> |
| 60 | where | 69 | where |
| 61 | M: RawMutex, | 70 | M: RawMutex, |
diff --git a/embassy-sync/src/waitqueue/waker.rs b/embassy-sync/src/waitqueue/waker.rs index 64e300eb8..9ce94a089 100644 --- a/embassy-sync/src/waitqueue/waker.rs +++ b/embassy-sync/src/waitqueue/waker.rs | |||
| @@ -6,7 +6,7 @@ use crate::blocking_mutex::raw::CriticalSectionRawMutex; | |||
| 6 | use crate::blocking_mutex::Mutex; | 6 | use crate::blocking_mutex::Mutex; |
| 7 | 7 | ||
| 8 | /// Utility struct to register and wake a waker. | 8 | /// Utility struct to register and wake a waker. |
| 9 | #[derive(Debug)] | 9 | #[derive(Debug, Default)] |
| 10 | pub struct WakerRegistration { | 10 | pub struct WakerRegistration { |
| 11 | waker: Option<Waker>, | 11 | waker: Option<Waker>, |
| 12 | } | 12 | } |
