diff --git a/src/utils/geometry.rs b/src/utils/geometry.rs index d96bb7e..603007d 100644 --- a/src/utils/geometry.rs +++ b/src/utils/geometry.rs @@ -817,7 +817,8 @@ impl Rectangle { /// Checks whether a given [`Rectangle`] overlaps with this one #[inline] - pub fn overlaps(self, other: Rectangle) -> bool { + pub fn overlaps(self, other: impl Into>) -> bool { + let other = other.into(); // if the rectangle is not outside of the other // they must overlap !(