From 5b813c10d152475b93be5d251ed8a53c11cd14f5 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Sun, 15 Jan 2023 20:49:30 +0000 Subject: [PATCH] Derive default as now required by clippy --- examples/the-hat-chooses-the-wizard/src/enemies.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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,