From bed70a42ecf0747f924c813b3b375d5fd364ffc3 Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Fri, 18 Apr 2014 13:49:37 +1000 Subject: Have floating point functions take their parameters by value. Make all of the methods in `std::num::Float` take `self` and their other parameters by value. Some of the `Float` methods took their parameters by value, and others took them by reference. This standardises them to one convention. The `Float` trait is intended for the built in IEEE 754 numbers only so we don't have to worry about the trait serving types of larger sizes. [breaking-change] --- src/libtest/stats.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libtest') diff --git a/src/libtest/stats.rs b/src/libtest/stats.rs index 1341b8d230f..d55fcc66026 100644 --- a/src/libtest/stats.rs +++ b/src/libtest/stats.rs @@ -352,8 +352,8 @@ pub fn write_boxplot(w: &mut io::Writer, s: &Summary, let (q1,q2,q3) = s.quartiles; // the .abs() handles the case where numbers are negative - let lomag = (10.0_f64).powf(&(s.min.abs().log10().floor())); - let himag = (10.0_f64).powf(&(s.max.abs().log10().floor())); + let lomag = 10.0_f64.powf(s.min.abs().log10().floor()); + let himag = 10.0_f64.powf(s.max.abs().log10().floor()); // need to consider when the limit is zero let lo = if lomag == 0.0 { -- cgit 1.4.1-3-g733a5