Reverted for-loop, it messes up type inference

This commit is contained in:
llogiq 2015-09-08 09:02:04 +02:00
parent 1c87c3530c
commit d956e63b1c

View File

@ -168,7 +168,8 @@ fn sum(&self) -> 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);
}