@@ -125,7 +125,7 @@ impl Ord for BigUint {
125
125
impl TotalOrd for BigUint {
126
126
127
127
fn cmp ( & self , other : & BigUint ) -> Ordering {
128
- let s_len = self . data . len ( ) , o_len = other. data . len ( ) ;
128
+ let ( s_len, o_len ) = ( self . data . len ( ) , other. data . len ( ) ) ;
129
129
if s_len < o_len { return Less ; }
130
130
if s_len > o_len { return Greater ; }
131
131
@@ -255,7 +255,7 @@ impl Mul<BigUint, BigUint> for BigUint {
255
255
fn mul ( & self , other : & BigUint ) -> BigUint {
256
256
if self . is_zero ( ) || other. is_zero ( ) { return Zero :: zero ( ) ; }
257
257
258
- let s_len = self . data . len ( ) , o_len = other. data . len ( ) ;
258
+ let ( s_len, o_len ) = ( self . data . len ( ) , other. data . len ( ) ) ;
259
259
if s_len == 1 { return mul_digit ( other, self . data [ 0 ] ) ; }
260
260
if o_len == 1 { return mul_digit ( self , other. data [ 0 ] ) ; }
261
261
@@ -447,7 +447,7 @@ impl Integer for BigUint {
447
447
448
448
fn gcd ( & self , other : & BigUint ) -> BigUint {
449
449
// Use Euclid's algorithm
450
- let mut m = copy * self , n = copy * other;
450
+ let mut ( m , n ) = ( copy * self , copy * other) ;
451
451
while !m. is_zero ( ) {
452
452
let temp = m;
453
453
m = n % temp;
@@ -1002,8 +1002,8 @@ impl Integer for BigInt {
1002
1002
fn div_mod_floor ( & self , other : & BigInt ) -> ( BigInt , BigInt ) {
1003
1003
// m.sign == other.sign
1004
1004
let ( d_ui, m_ui) = self . data . div_rem ( & other. data ) ;
1005
- let d = BigInt :: from_biguint ( Plus , d_ui) ,
1006
- m = BigInt :: from_biguint ( Plus , m_ui) ;
1005
+ let d = BigInt :: from_biguint ( Plus , d_ui) ;
1006
+ let m = BigInt :: from_biguint ( Plus , m_ui) ;
1007
1007
match ( self . sign , other. sign ) {
1008
1008
( _, Zero ) => fail ! ( ) ,
1009
1009
( Plus , Plus ) | ( Zero , Plus ) => ( d, m) ,
0 commit comments