From 3840c4ce800e33d9e1ad5cf325ed90d5433059c7 Mon Sep 17 00:00:00 2001 From: Corwin Date: Sat, 13 Jan 2024 10:31:09 +0000 Subject: [PATCH] remove unused enum parameter --- examples/amplitude/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/amplitude/src/lib.rs b/examples/amplitude/src/lib.rs index ccff7f21..7da2c938 100644 --- a/examples/amplitude/src/lib.rs +++ b/examples/amplitude/src/lib.rs @@ -186,7 +186,7 @@ struct Game { enum GameState { Continue, - Loss(u32), + Loss, } impl Game { @@ -314,7 +314,7 @@ impl Game { || (self.head_position.y + 1).floor() > display::HEIGHT + 4; if saw_has_hit_head || out_of_bounds_death { - GameState::Loss(self.alive_frames) + GameState::Loss } else { GameState::Continue } @@ -443,7 +443,7 @@ pub fn main(mut gba: agb::Gba) -> ! { game.render(oam_frame, &sprite_cache); - if let GameState::Loss(_) = state { + if matches!(state, GameState::Loss) { for _ in 0..30 { vblank.wait_for_vblank(); }