Skip to content

Commit

Permalink
fix(bigint): Remove unused check for BigInt lcm
Browse files Browse the repository at this point in the history
The BigInt lcm defaults to the BigUInt::lcm() method which already includes the
check. There is no need to do it here as well.
  • Loading branch information
TheLetterTheta committed Aug 24, 2019
1 parent e247980 commit 9430db3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2188,11 +2188,7 @@ impl Integer for BigInt {
/// Calculates the Lowest Common Multiple (LCM) of the number and `other`.
#[inline]
fn lcm(&self, other: &BigInt) -> BigInt {
if self.is_zero() && other.is_zero() {
Self::zero()
} else {
BigInt::from_biguint(Plus, self.data.lcm(&other.data))
}
BigInt::from_biguint(Plus, self.data.lcm(&other.data))
}

/// Deprecated, use `is_multiple_of` instead.
Expand Down

0 comments on commit 9430db3

Please sign in to comment.