forked from ROMEO/nexosim
derive Default
for State
in observables e.g.
This commit is contained in:
parent
b77a4eaa5f
commit
3530cc3405
@ -48,18 +48,14 @@ pub enum ModeId {
|
||||
}
|
||||
|
||||
/// Processor state.
|
||||
#[derive(Default)]
|
||||
pub enum State {
|
||||
#[default]
|
||||
Off,
|
||||
Idle,
|
||||
Processing(AutoActionKey),
|
||||
}
|
||||
|
||||
impl Default for State {
|
||||
fn default() -> Self {
|
||||
State::Off
|
||||
}
|
||||
}
|
||||
|
||||
impl Observable<ModeId> for State {
|
||||
fn observe(&self) -> ModeId {
|
||||
match *self {
|
||||
|
Loading…
x
Reference in New Issue
Block a user