diff --git a/examples/game/alien_cake_addict.rs b/examples/game/alien_cake_addict.rs index 9a7e0239ef..7f23e6f9dd 100644 --- a/examples/game/alien_cake_addict.rs +++ b/examples/game/alien_cake_addict.rs @@ -308,7 +308,8 @@ fn spawn_bonus( commands.entity(entity).despawn_recursive(); game.bonus.entity = None; if game.score <= -5 { - state.set(GameState::GameOver).unwrap(); + // We don't particularly care if this operation fails + let _ = state.overwrite_set(GameState::GameOver); return; } }