Remove unnecessary normalization
This commit is contained in:
parent
d0bfb54eee
commit
1e26bdde81
|
@ -519,8 +519,7 @@ impl Div<BigUint> for BigDigit {
|
||||||
type Output = BigUint;
|
type Output = BigUint;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn div(self, mut other: BigUint) -> BigUint {
|
fn div(self, other: BigUint) -> BigUint {
|
||||||
other = other.normalize();
|
|
||||||
match other.data.len() {
|
match other.data.len() {
|
||||||
0 => panic!(),
|
0 => panic!(),
|
||||||
1 => From::from(self / other.data[0]),
|
1 => From::from(self / other.data[0]),
|
||||||
|
@ -557,8 +556,7 @@ impl Rem<BigUint> for BigDigit {
|
||||||
type Output = BigUint;
|
type Output = BigUint;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn rem(self, mut other: BigUint) -> BigUint {
|
fn rem(self, other: BigUint) -> BigUint {
|
||||||
other = other.normalize();
|
|
||||||
match other.data.len() {
|
match other.data.len() {
|
||||||
0 => panic!(),
|
0 => panic!(),
|
||||||
1 => From::from(self % other.data[0]),
|
1 => From::from(self % other.data[0]),
|
||||||
|
|
Loading…
Reference in New Issue