diff --git a/src/gui.rs b/src/gui.rs index f205768..8af139a 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -265,17 +265,13 @@ impl App { } fn load_icon() -> eframe::egui::IconData { - let (icon_rgba, icon_width, icon_height) = { - let icon = include_bytes!("../assets/icon.png"); - let image = image::load_from_memory(icon).unwrap().into_rgba8(); - let (width, height) = image.dimensions(); - let rgba = image.into_raw(); - (rgba, width, height) - }; + let icon = include_bytes!("../assets/icon.png"); + let image = image::load_from_memory(icon).unwrap().into_rgba8(); + let (width, height) = image.dimensions(); eframe::egui::IconData { - rgba: icon_rgba, - width: icon_width, - height: icon_height, + rgba: image.into_raw(), + width, + height, } }