From 7ad283fd40e093511a84f9f1cdd67689acde444b Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Sun, 14 Jan 2024 13:14:06 +0100 Subject: bevy 11 --- src/cell.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/cell.rs') diff --git a/src/cell.rs b/src/cell.rs index 53e9860..6571cd5 100644 --- a/src/cell.rs +++ b/src/cell.rs @@ -43,8 +43,9 @@ impl AnimationTimer { } } -#[derive(Debug, PartialEq, Clone, Copy)] +#[derive(Debug, PartialEq, Clone, Copy, Default)] pub enum Occupant { + #[default] None, Green, Yellow, @@ -54,12 +55,6 @@ pub enum Occupant { Explosion, } -impl Default for Occupant { - fn default() -> Occupant { - Occupant::None - } -} - impl Occupant { pub fn to_index(&self) -> usize { match self { -- cgit v1.2.3