use embassy_futures::select::{Either, Either3, Either4}; use embassy_sync::blocking_mutex::raw::NoopRawMutex; pub type Notification = embassy_sync::signal::Signal; pub trait EitherUnwrap { fn unwrap(self) -> T; } impl EitherUnwrap for Either { fn unwrap(self) -> T { match self { Self::First(t) => t, Self::Second(t) => t, } } } impl EitherUnwrap for Either3 { fn unwrap(self) -> T { match self { Self::First(t) => t, Self::Second(t) => t, Self::Third(t) => t, } } } impl EitherUnwrap for Either4 { fn unwrap(self) -> T { match self { Self::First(t) => t, Self::Second(t) => t, Self::Third(t) => t, Self::Fourth(t) => t, } } }