From 491c8eb6fb920165148cdc7ab574fe062fc431fe Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Mon, 16 May 2022 11:54:14 -0400 Subject: [PATCH] clippy --- src/misc.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/misc.rs b/src/misc.rs index 4d6c293..1f2c066 100644 --- a/src/misc.rs +++ b/src/misc.rs @@ -260,7 +260,7 @@ fn newtons_method( } // return x2 as loop breaks before x1 is set to x2 - return Some(x2); + Some(x2) } /// Inputs `Vec>` and outputs a `String` containing a pretty representation of the Vector @@ -310,9 +310,9 @@ pub fn step_helper(max_i: usize, min_x: &f64, step: &f64) -> Vec { pub fn almost_variable(x: f64) -> Option { const EPSILON: f32 = f32::EPSILON * 2.0; if emath::almost_equal(x as f32, std::f32::consts::E, EPSILON) { - return Some('e'); + Some('e') } else if emath::almost_equal(x as f32, std::f32::consts::PI, EPSILON) { - return Some('π'); + Some('π') } else { None }