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.
pub const fn new_with(data: Option<T>) -> Self {
/// Create a new `Watch` channel with default data.
pub const fn new_with(data: T) -> Self {
Self {
mutex: Mutex::new(RefCell::new(WatchState {
data,
data: Some(data),
current_id: 0,
wakers: MultiWakerRegistration::new(),
receiver_count: 0,