diff --git a/core/src/rectangle.rs b/core/src/rectangle.rs index 8ffb0797..bea27b9d 100644 --- a/core/src/rectangle.rs +++ b/core/src/rectangle.rs @@ -244,7 +244,7 @@ impl Rectangle { /// Snaps the [`Rectangle`] to __unsigned__ integer coordinates. pub fn snap(self) -> Option> { let top_left = self.position().snap(); - let bottom_right = (self.position() + self.size().into()).snap(); + let bottom_right = (self.position() + Vector::from(self.size())).snap(); let width = bottom_right.x.checked_sub(top_left.x)?; let height = bottom_right.y.checked_sub(top_left.y)?;