Skip to content

Commit 0d64ef4

Browse files
committed
fix for rust 1.41.0
1 parent b6f06a9 commit 0d64ef4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lagrange.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ fn barycentric_interpolate_at(k: usize, points: &[(u8, u8)]) -> u8 {
2727
let delta = x[j] - x[i];
2828
assert_ne!(delta.poly, 0, "Duplicate shares");
2929
w[j] /= delta;
30-
w[i] -= w[j];
30+
let wj = w[j];
31+
w[i] -= wj;
3132
}
3233
}
3334

0 commit comments

Comments
 (0)