From d956e63b1c9c09223c66f37a1be923ee6d5ff4cd Mon Sep 17 00:00:00 2001 From: llogiq Date: Tue, 8 Sep 2015 09:02:04 +0200 Subject: [PATCH] Reverted for-loop, it messes up type inference --- src/libtest/stats.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libtest/stats.rs b/src/libtest/stats.rs index b0d33f9e7107..c1ba1260f67e 100644 --- a/src/libtest/stats.rs +++ b/src/libtest/stats.rs @@ -168,7 +168,8 @@ impl Stats for [f64] { let mut j = 0; // This inner loop applies `hi`/`lo` summation to each // partial so that the list of partial sums remains exact. - for mut y in &mut partials { + for i in 0..partials.len() { + let mut y: f64 = partials[i]; if x.abs() < y.abs() { mem::swap(&mut x, &mut y); }