rect: safer construction
This commit is contained in:
parent
411af0ea18
commit
a1dfc473a2
33 changed files with 245 additions and 159 deletions
|
|
@ -66,7 +66,7 @@ impl DisplayNode {
|
|||
y1 = 0;
|
||||
y2 = 0;
|
||||
}
|
||||
self.extents.set(Rect::new(x1, y1, x2, y2).unwrap());
|
||||
self.extents.set(Rect::new_saturating(x1, y1, x2, y2));
|
||||
}
|
||||
|
||||
pub fn update_visible(&self, state: &State) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue