Compare regions, not four loose numbers
`PixelRegion` derives `PartialEq`, `Clone` and `Copy`, so `assert_corners!` compares one against another instead of flattening both to a tuple whose order there was nothing to check. A failure now prints two regions.
This commit is contained in:
1 parent
0f9f379cec
commit
7cefc72f97
2 files changed
+9
-13
No files matched your search
@@ -421,7 +421,7 @@ impl Display for UiRegion {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct PixelRegion {
|
||||
pub top_left: Vec2,
|
||||
pub bot_right: Vec2,
|
||||
|
||||
Reference in new issue
Block a user