From 78113ac6bc17546a91b4b597417184dc0f89eab1 Mon Sep 17 00:00:00 2001 From: Jonas Maier Date: Tue, 12 May 2026 21:59:30 +0200 Subject: clippy --- src/main.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main.rs') 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 -- cgit v1.2.3