From a612aa1fbfc283520905d83b9f4070116bfdd035 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 29 Mar 2022 21:49:29 -0400 Subject: [PATCH] fix --- src/function.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/function.rs b/src/function.rs index cded261..2bb435a 100644 --- a/src/function.rs +++ b/src/function.rs @@ -140,14 +140,14 @@ impl FunctionEntry { 0 => newtons_method_helper( &threshold, &range, - &self.output.back.to_owned().unwrap(), + &self.output.back.as_ref().unwrap(), &|x: f64| self.function.get(x), &|x: f64| self.function.get_derivative_1(x), ), 1 => newtons_method_helper( &threshold, &range, - &self.output.derivative.to_owned().unwrap(), + &self.output.derivative.as_ref().unwrap(), &|x: f64| self.function.get_derivative_1(x), &|x: f64| self.function.get_derivative_2(x), ),