diff --git a/src/rect.rs b/src/rect.rs index 7d64452..b66fa31 100644 --- a/src/rect.rs +++ b/src/rect.rs @@ -222,7 +222,7 @@ where T: Copy + Clone + Zero + PartialOrd + PartialEq + Add + Sub]) -> Self { - if points.len() == 0 { + if points.is_empty() { return TypedRect::zero(); } let (mut min_x, mut min_y) = (points[0].x, points[0].y); diff --git a/src/rotation.rs b/src/rotation.rs index a50659f..baab581 100644 --- a/src/rotation.rs +++ b/src/rotation.rs @@ -487,7 +487,7 @@ where T: Copy + Clone + #[inline] pub fn lerp(&self, other: &Self, t: T) -> Self { let one_t = T::one() - t; - return self.mul(one_t).add(other.mul(t)).normalize(); + self.mul(one_t).add(other.mul(t)).normalize() } /// Returns the given 3d point transformed by this rotation.