remove option

This commit is contained in:
Bronson 2024-11-10 21:09:24 +10:30
parent 32f0cde1cc
commit 730dde9ba9

View File

@ -310,11 +310,11 @@ impl<M: RawMutex, T: Clone, const N: usize> Watch<M, T, N> {
} }
} }
/// Create a new `Watch` channel. /// Create a new `Watch` channel with default data.
pub const fn new_with(data: Option<T>) -> Self { pub const fn new_with(data: T) -> Self {
Self { Self {
mutex: Mutex::new(RefCell::new(WatchState { mutex: Mutex::new(RefCell::new(WatchState {
data, data: Some(data),
current_id: 0, current_id: 0,
wakers: MultiWakerRegistration::new(), wakers: MultiWakerRegistration::new(),
receiver_count: 0, receiver_count: 0,