diff --git a/nexosim-util/examples/observables.rs b/nexosim-util/examples/observables.rs index 16e598c..c80f2b0 100644 --- a/nexosim-util/examples/observables.rs +++ b/nexosim-util/examples/observables.rs @@ -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 for State { fn observe(&self) -> ModeId { match *self {