diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-04 10:14:51 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-04 11:22:56 +0300 |
| commit | a2f9d132a088e399fb1f292d84d3d3862127f02e (patch) | |
| tree | 0e04941d8ae35be9362c53f8d41177cc71e24214 /src/utils | |
| parent | 1973b97cc2a51d697add3d9ad7210a4e6eba9183 (diff) | |
| download | niri-a2f9d132a088e399fb1f292d84d3d3862127f02e.tar.gz niri-a2f9d132a088e399fb1f292d84d3d3862127f02e.tar.bz2 niri-a2f9d132a088e399fb1f292d84d3d3862127f02e.zip | |
Migrate to new Rectangle functions
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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()); } |
