@@ -16,6 +16,8 @@ A `BigUint` is represented as an array of `BigDigit`s.
1616A `BigInt` is a combination of `BigUint` and `Sign`.
1717*/
1818
19+ use Integer ;
20+
1921use std:: cmp;
2022use std:: cmp:: { Eq , Ord , TotalEq , TotalOrd , Ordering , Less , Equal , Greater } ;
2123use std:: num:: { Zero , One , ToStrRadix , FromStrRadix } ;
@@ -461,7 +463,7 @@ impl Integer for BigUint {
461463
462464 /// Returns `true` if the number can be divided by `other` without leaving a remainder
463465 #[ 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 ( ) }
465467
466468 /// Returns `true` if the number is divisible by `2`
467469 #[ inline]
@@ -1118,7 +1120,7 @@ impl Integer for BigInt {
11181120
11191121 /// Returns `true` if the number can be divided by `other` without leaving a remainder
11201122 #[ 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 ) }
11221124
11231125 /// Returns `true` if the number is divisible by `2`
11241126 #[ inline]
@@ -1388,6 +1390,7 @@ impl BigInt {
13881390
13891391#[cfg(test)]
13901392mod biguint_tests {
1393+ use Integer;
13911394 use super::{BigDigit, BigUint, ToBigUint};
13921395 use super::{Plus, BigInt, RandBigInt, ToBigInt};
13931396
@@ -2045,6 +2048,7 @@ mod biguint_tests {
20452048
20462049#[ cfg( test) ]
20472050mod bigint_tests {
2051+ use Integer ;
20482052 use super :: { BigDigit , BigUint , ToBigUint } ;
20492053 use super :: { Sign , Minus , Zero , Plus , BigInt , RandBigInt , ToBigInt } ;
20502054
0 commit comments