From 1624a87efa9eab6d6a996ffde0da507074b7e805 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 11 Oct 2020 11:01:20 +0200 Subject: [PATCH] clippy: fix #needless_return --- src/geometry/quaternion_construction.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/geometry/quaternion_construction.rs b/src/geometry/quaternion_construction.rs index a59d3030..33e05867 100644 --- a/src/geometry/quaternion_construction.rs +++ b/src/geometry/quaternion_construction.rs @@ -492,18 +492,18 @@ where // The cosinus may be out of [-1, 1] because of inaccuracies. if cos <= -N::one() { - return None; + None } else if cos >= N::one() { - return Some(Self::identity()); + Some(Self::identity()) } else { - return Some(Self::from_axis_angle(&axis, cos.acos() * s)); + Some(Self::from_axis_angle(&axis, cos.acos() * s)) } } else if na.dot(&nb) < N::zero() { // PI // // The rotation axis is undefined but the angle not zero. This is not a // simple rotation. - return None; + None } else { // Zero Some(Self::identity())