diff --git a/examples/the-hat-chooses-the-wizard/src/enemies.rs b/examples/the-hat-chooses-the-wizard/src/enemies.rs index b4182dae..223f067d 100644 --- a/examples/the-hat-chooses-the-wizard/src/enemies.rs +++ b/examples/the-hat-chooses-the-wizard/src/enemies.rs @@ -21,18 +21,14 @@ enum UpdateState { Remove, } +#[derive(Default)] pub enum Enemy<'a> { Slime(Slime<'a>), Snail(Snail<'a>), + #[default] Empty, } -impl<'a> Default for Enemy<'a> { - fn default() -> Self { - Enemy::Empty - } -} - pub enum EnemyUpdateState { None, KillPlayer,