diff options
| author | Bronson <[email protected]> | 2024-11-10 21:09:24 +1030 |
|---|---|---|
| committer | Bronson <[email protected]> | 2024-11-10 21:09:24 +1030 |
| commit | 730dde9ba901d89040d3d943cf36b4217ac52bf9 (patch) | |
| tree | b4f704b09526fdb7207a09a1085adf1c0772f5dd | |
| parent | 32f0cde1cc6f277fb3f91d9fc0cc754c09267376 (diff) | |
remove option
| -rw-r--r-- | embassy-sync/src/watch.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-sync/src/watch.rs b/embassy-sync/src/watch.rs index d645ffe17..404e31714 100644 --- a/embassy-sync/src/watch.rs +++ b/embassy-sync/src/watch.rs | |||
| @@ -310,11 +310,11 @@ impl<M: RawMutex, T: Clone, const N: usize> Watch<M, T, N> { | |||
| 310 | } | 310 | } |
| 311 | } | 311 | } |
| 312 | 312 | ||
| 313 | /// Create a new `Watch` channel. | 313 | /// Create a new `Watch` channel with default data. |
| 314 | pub const fn new_with(data: Option<T>) -> Self { | 314 | pub const fn new_with(data: T) -> Self { |
| 315 | Self { | 315 | Self { |
| 316 | mutex: Mutex::new(RefCell::new(WatchState { | 316 | mutex: Mutex::new(RefCell::new(WatchState { |
| 317 | data, | 317 | data: Some(data), |
| 318 | current_id: 0, | 318 | current_id: 0, |
| 319 | wakers: MultiWakerRegistration::new(), | 319 | wakers: MultiWakerRegistration::new(), |
| 320 | receiver_count: 0, | 320 | receiver_count: 0, |
