Replace generic into call with Vector::from
This commit is contained in:
parent
6f935f3449
commit
08a37406f2
1 changed files with 1 additions and 1 deletions
|
|
@ -244,7 +244,7 @@ impl Rectangle<f32> {
|
|||
/// Snaps the [`Rectangle`] to __unsigned__ integer coordinates.
|
||||
pub fn snap(self) -> Option<Rectangle<u32>> {
|
||||
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)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue