From 1fbe2ae41afc7e52639cae52adf98192eb56c47f Mon Sep 17 00:00:00 2001 From: ahirner Date: Sun, 15 Oct 2023 08:57:48 +0200 Subject: [PATCH] unneccessary cast --- infur/src/gui.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infur/src/gui.rs b/infur/src/gui.rs index 0cd1e80..d55250d 100644 --- a/infur/src/gui.rs +++ b/infur/src/gui.rs @@ -319,7 +319,7 @@ impl eframe::App for InFur { // occupy max width with constant aspect ratio let max_width = ui.available_width(); let [w, h] = tex_frame.handle.size(); - let w_scale = max_width as f32 / w as f32; + let w_scale = max_width / w as f32; let (w, h) = (w as f32 * w_scale, h as f32 * w_scale); ui.image(&tex_frame.handle, [w, h]); // prop decoded image underneath