From 12c180637ba3b1960320fefb534b9f0b6922f2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com> Date: Sun, 21 May 2023 20:44:24 +0100 Subject: [PATCH] fix: clippy issue --- frontends/sdl/src/main.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/frontends/sdl/src/main.rs b/frontends/sdl/src/main.rs index 24135de0..b9373fb2 100644 --- a/frontends/sdl/src/main.rs +++ b/frontends/sdl/src/main.rs @@ -203,13 +203,10 @@ impl Emulator { "========= Cartridge =========\n{}\n=============================", rom ); - match self.sdl { - Some(ref mut sdl) => { - sdl.window_mut() - .set_title(format!("{} [{}]", self.title, rom.title()).as_str()) - .unwrap(); - } - None => (), + if let Some(ref mut sdl) = self.sdl { + sdl.window_mut() + .set_title(format!("{} [{}]", self.title, rom.title()).as_str()) + .unwrap(); } self.rom_path = String::from(path_res); } -- GitLab