From 6c546564a33a6a556d5ba8b761f93a0374355c79 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Thu, 14 Dec 2017 11:44:13 +0700 Subject: [PATCH] Fixes for a couple of clippy warnings. --- src/rect.rs | 2 +- src/rotation.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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.