about summary refs log tree commit diff
path: root/src/libstd/num
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2013-04-29 16:02:43 +1000
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2013-04-29 16:03:48 +1000
commit20ad931bf337db2efd25e6571e322d31b5b83877 (patch)
tree4be175281d008a2aa63175a663630929ae5fbccd /src/libstd/num
parent8f63f9789b12a69723630ae072b6ba63203ed0f6 (diff)
downloadrust-20ad931bf337db2efd25e6571e322d31b5b83877.tar.gz
rust-20ad931bf337db2efd25e6571e322d31b5b83877.zip
Rename 'divisible_by' method to 'is_multiple_of', add tests for 'is_odd' and 'is_even'
Diffstat (limited to 'src/libstd/num')
-rw-r--r--src/libstd/num/bigint.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/num/bigint.rs b/src/libstd/num/bigint.rs
index 3ea94eababb..e97b3b5eeec 100644
--- a/src/libstd/num/bigint.rs
+++ b/src/libstd/num/bigint.rs
@@ -428,7 +428,7 @@ impl Integer for BigUint {
 
     /// Returns `true` if the number can be divided by `other` without leaving a remainder
     #[inline(always)]
-    fn divisible_by(&self, other: &BigUint) -> bool { (*self % *other).is_zero() }
+    fn is_multiple_of(&self, other: &BigUint) -> bool { (*self % *other).is_zero() }
 
     /// Returns `true` if the number is divisible by `2`
     #[inline(always)]
@@ -973,7 +973,7 @@ impl Integer for BigInt {
 
     /// Returns `true` if the number can be divided by `other` without leaving a remainder
     #[inline(always)]
-    fn divisible_by(&self, other: &BigInt) -> bool { self.data.divisible_by(&other.data) }
+    fn is_multiple_of(&self, other: &BigInt) -> bool { self.data.is_multiple_of(&other.data) }
 
     /// Returns `true` if the number is divisible by `2`
     #[inline(always)]