Skip to content

Commit df17bbd

Browse files
Fixed mistake (wrapping_add does not mutate of course!)
1 parent 82e8e68 commit df17bbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/internal_math.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl Barrett {
6060
let x = (((z as u128) * (self.im as u128)) >> 64) as u64;
6161
let mut v = (z - x * self._m as u64) as u32;
6262
if self._m <= v {
63-
v.wrapping_add(self._m);
63+
v = v.wrapping_add(self._m);
6464
}
6565
v
6666
}

0 commit comments

Comments
 (0)