@@ -16,6 +16,8 @@ A `BigUint` is represented as an array of `BigDigit`s.
16
16
A `BigInt` is a combination of `BigUint` and `Sign`.
17
17
*/
18
18
19
+ use Integer ;
20
+
19
21
use std:: cmp;
20
22
use std:: cmp:: { Eq , Ord , TotalEq , TotalOrd , Ordering , Less , Equal , Greater } ;
21
23
use std:: num:: { Zero , One , ToStrRadix , FromStrRadix } ;
@@ -461,7 +463,7 @@ impl Integer for BigUint {
461
463
462
464
/// Returns `true` if the number can be divided by `other` without leaving a remainder
463
465
#[ inline]
464
- fn is_multiple_of ( & self , other : & BigUint ) -> bool { ( * self % * other) . is_zero ( ) }
466
+ fn divides ( & self , other : & BigUint ) -> bool { ( * self % * other) . is_zero ( ) }
465
467
466
468
/// Returns `true` if the number is divisible by `2`
467
469
#[ inline]
@@ -1118,7 +1120,7 @@ impl Integer for BigInt {
1118
1120
1119
1121
/// Returns `true` if the number can be divided by `other` without leaving a remainder
1120
1122
#[ inline]
1121
- fn is_multiple_of ( & self , other : & BigInt ) -> bool { self . data . is_multiple_of ( & other. data ) }
1123
+ fn divides ( & self , other : & BigInt ) -> bool { self . data . divides ( & other. data ) }
1122
1124
1123
1125
/// Returns `true` if the number is divisible by `2`
1124
1126
#[ inline]
@@ -1388,6 +1390,7 @@ impl BigInt {
1388
1390
1389
1391
#[cfg(test)]
1390
1392
mod biguint_tests {
1393
+ use Integer;
1391
1394
use super::{BigDigit, BigUint, ToBigUint};
1392
1395
use super::{Plus, BigInt, RandBigInt, ToBigInt};
1393
1396
@@ -2045,6 +2048,7 @@ mod biguint_tests {
2045
2048
2046
2049
#[ cfg( test) ]
2047
2050
mod bigint_tests {
2051
+ use Integer ;
2048
2052
use super :: { BigDigit , BigUint , ToBigUint } ;
2049
2053
use super :: { Sign , Minus , Zero , Plus , BigInt , RandBigInt , ToBigInt } ;
2050
2054
0 commit comments