diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs index fc44fa5..89b2e64 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,14 +13,14 @@ fn main() { // it is quite annoying when the terminal window closes due to a crash, so let's just catch all panics loop { let res = std::panic::catch_unwind(pish::event_loop); - match res { - Ok(_) => break, - Err(_) => { - #[cfg(debug_assertions)] - unsafe { - pish::reload::continue_reload() - } - } + + if res.is_ok() { + break; + } + + #[cfg(debug_assertions)] + unsafe { + pish::reload::continue_reload() } // prevent incredibly fast panic loops |
