geometry: s/assert/debug_assert/

This commit is contained in:
Victoria Fischer 2024-11-23 15:01:24 +01:00
parent a7b681a046
commit 23fcf1f35f

View File

@ -96,8 +96,8 @@ pub struct Rectangle<CoordData: CoordLimits<Data = CoordData> + Clone + Copy, Sp
impl<CoordData: CoordLimits<Data = CoordData> + Sub<Output=CoordData> + Clone + Copy, Space: CoordinateSpace> Rectangle<CoordData, Space> {
pub fn new(top_left: Coordinates<CoordData, Space>, bottom_right: Coordinates<CoordData, Space>) -> Self {
assert!(top_left.x <= bottom_right.x);
assert!(top_left.y <= bottom_right.y);
debug_assert!(top_left.x <= bottom_right.x);
debug_assert!(top_left.y <= bottom_right.y);
Self {
top_left,
bottom_right