From 7f69244e070282a1dfbaa24c02f9234cb8a2a0b9 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Tue, 31 Dec 2024 09:04:28 -0800 Subject: [PATCH] Use `Mul` impl of `Size` --- src/shell/layout/tiling/mod.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/shell/layout/tiling/mod.rs b/src/shell/layout/tiling/mod.rs index 2b7b5ad1..fbe8f84b 100644 --- a/src/shell/layout/tiling/mod.rs +++ b/src/shell/layout/tiling/mod.rs @@ -5075,11 +5075,7 @@ fn render_old_tree( .map(|adapted_geo| { Rectangle::new( adapted_geo.loc + offset, - ( - (original_geo.size.w as f64 * scale).round() as i32, - (original_geo.size.h as f64 * scale).round() as i32, - ) - .into(), + (original_geo.size.to_f64() * scale).to_i32_round(), ) }) .unwrap_or(*original_geo); @@ -5643,11 +5639,7 @@ fn render_new_tree( .map(|adapted_geo| { Rectangle::new( adapted_geo.loc + offset, - ( - (original_geo.size.w as f64 * scale).round() as i32, - (original_geo.size.h as f64 * scale).round() as i32, - ) - .into(), + (original_geo.size.to_f64() * scale).to_i32_round(), ) }) .unwrap_or(*original_geo),