From a2f9d132a088e399fb1f292d84d3d3862127f02e Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sat, 4 Jan 2025 10:14:51 +0300 Subject: Migrate to new Rectangle functions --- src/utils/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils/mod.rs') diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 6507bee2..26b9c829 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -375,8 +375,8 @@ mod tests { (rx, ry, rw, rh): (i32, i32, i32, i32), (ex, ey): (i32, i32), ) { - let area = Rectangle::from_loc_and_size((ax, ay), (aw, ah)).to_f64(); - let mut rect = Rectangle::from_loc_and_size((rx, ry), (rw, rh)).to_f64(); + let area = Rectangle::new(Point::from((ax, ay)), Size::from((aw, ah))).to_f64(); + let mut rect = Rectangle::new(Point::from((rx, ry)), Size::from((rw, rh))).to_f64(); clamp_preferring_top_left_in_area(area, &mut rect); assert_eq!(rect.loc, Point::from((ex, ey)).to_f64()); } -- cgit