From 9a2276c66d87ab92bb9842aa6211a0b6bda50f9c Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Fri, 19 Mar 2021 11:05:03 -0700 Subject: [PATCH] Code review: prefer `unreachable` to `todo` for checkins --- game/src/sandbox/dashboards/trip_table.rs | 2 +- game/src/sandbox/time_warp.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/game/src/sandbox/dashboards/trip_table.rs b/game/src/sandbox/dashboards/trip_table.rs index f0a3286f18..6844d06f59 100644 --- a/game/src/sandbox/dashboards/trip_table.rs +++ b/game/src/sandbox/dashboards/trip_table.rs @@ -139,7 +139,7 @@ impl State for TripTable { } else if self.table_tabs.handle_action(ctx, &x, &mut self.panel) { // if true, tabs handled the action } else { - todo!("unhandled action: {}", x) + unreachable!("unhandled action: {}", x) } } Outcome::Changed => { diff --git a/game/src/sandbox/time_warp.rs b/game/src/sandbox/time_warp.rs index e2a01c3478..1b8ed454b8 100644 --- a/game/src/sandbox/time_warp.rs +++ b/game/src/sandbox/time_warp.rs @@ -168,7 +168,7 @@ impl State for JumpToTime { if self.tabs.handle_action(ctx, action, &mut self.panel) { // if true, tabs has handled the action } else { - todo!("handle action: {}", action) + unreachable!("unhandled action: {}", action) } } },