From 1e26bdde8105ff267c15cf20bae8df1a414b9dce Mon Sep 17 00:00:00 2001 From: Sam Cappleman-Lynes Date: Thu, 29 Jun 2017 13:53:08 +0100 Subject: [PATCH] Remove unnecessary normalization --- bigint/src/biguint.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bigint/src/biguint.rs b/bigint/src/biguint.rs index b055b6a..631686d 100644 --- a/bigint/src/biguint.rs +++ b/bigint/src/biguint.rs @@ -519,8 +519,7 @@ impl Div for BigDigit { type Output = BigUint; #[inline] - fn div(self, mut other: BigUint) -> BigUint { - other = other.normalize(); + fn div(self, other: BigUint) -> BigUint { match other.data.len() { 0 => panic!(), 1 => From::from(self / other.data[0]), @@ -557,8 +556,7 @@ impl Rem for BigDigit { type Output = BigUint; #[inline] - fn rem(self, mut other: BigUint) -> BigUint { - other = other.normalize(); + fn rem(self, other: BigUint) -> BigUint { match other.data.len() { 0 => panic!(), 1 => From::from(self % other.data[0]),