Skip to content

Commit

Permalink
fix mulassign impl
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Jul 23, 2018
1 parent 78b142c commit 3f85d57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/biguint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ impl MulAssign<u128> for BigUint {
if other == 0 {
self.data.clear();
} else if other <= BigDigit::max_value() as u128 {
*self *= other
*self *= other as BigDigit
} else {
let (hi, lo) = big_digit::from_doublebigdigit(other);
*self = mul3(&self.data[..], &[lo, hi])
Expand Down Expand Up @@ -1525,7 +1525,7 @@ impl ToPrimitive for BigUint {
ret |= (*i as u128) << bits;
bits += big_digit::BITS;
}
println!("{:?} -> {}", self, ret);

Some(ret)
}

Expand Down

0 comments on commit 3f85d57

Please sign in to comment.