mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-12-11 16:12:31 +00:00
remove option
This commit is contained in:
parent
32f0cde1cc
commit
730dde9ba9
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user