diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-31 10:43:52 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-01 10:31:27 -0700 |
| commit | bba701c59d84eac4e20d0796ec06db8d1cdd39cf (patch) | |
| tree | 3c2109ca567bbc7e7b8d66da7282dac8f8926da6 /src/libnum | |
| parent | c605c2b57b412402e6b491e91852fd9dbadeb551 (diff) | |
| download | rust-bba701c59d84eac4e20d0796ec06db8d1cdd39cf.tar.gz rust-bba701c59d84eac4e20d0796ec06db8d1cdd39cf.zip | |
std: Drop Total from Total{Eq,Ord}
This completes the last stage of the renaming of the comparison hierarchy of traits. This change renames TotalEq to Eq and TotalOrd to Ord. In the future the new Eq/Ord will be filled out with their appropriate methods, but for now this change is purely a renaming change. [breaking-change]
Diffstat (limited to 'src/libnum')
| -rw-r--r-- | src/libnum/bigint.rs | 10 | ||||
| -rw-r--r-- | src/libnum/rational.rs | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libnum/bigint.rs b/src/libnum/bigint.rs index 9264cb541a9..4a848535b8d 100644 --- a/src/libnum/bigint.rs +++ b/src/libnum/bigint.rs @@ -89,7 +89,7 @@ impl PartialEq for BigUint { match self.cmp(other) { Equal => true, _ => false } } } -impl TotalEq for BigUint {} +impl Eq for BigUint {} impl PartialOrd for BigUint { #[inline] @@ -98,7 +98,7 @@ impl PartialOrd for BigUint { } } -impl TotalOrd for BigUint { +impl Ord for BigUint { #[inline] fn cmp(&self, other: &BigUint) -> Ordering { let (s_len, o_len) = (self.data.len(), other.data.len()); @@ -786,7 +786,7 @@ fn get_radix_base(radix: uint) -> (DoubleBigDigit, uint) { } /// A Sign is a `BigInt`'s composing element. -#[deriving(PartialEq, PartialOrd, TotalEq, TotalOrd, Clone, Show)] +#[deriving(PartialEq, PartialOrd, Eq, Ord, Clone, Show)] pub enum Sign { Minus, Zero, Plus } impl Neg<Sign> for Sign { @@ -815,7 +815,7 @@ impl PartialEq for BigInt { } } -impl TotalEq for BigInt {} +impl Eq for BigInt {} impl PartialOrd for BigInt { #[inline] @@ -824,7 +824,7 @@ impl PartialOrd for BigInt { } } -impl TotalOrd for BigInt { +impl Ord for BigInt { #[inline] fn cmp(&self, other: &BigInt) -> Ordering { let scmp = self.sign.cmp(&other.sign); diff --git a/src/libnum/rational.rs b/src/libnum/rational.rs index 71a23a23a26..3efc359fd3f 100644 --- a/src/libnum/rational.rs +++ b/src/libnum/rational.rs @@ -194,8 +194,8 @@ macro_rules! cmp_impl { } cmp_impl!(impl PartialEq, eq, ne) cmp_impl!(impl PartialOrd, lt, gt, le, ge) -cmp_impl!(impl TotalEq, ) -cmp_impl!(impl TotalOrd, cmp -> cmp::Ordering) +cmp_impl!(impl Eq, ) +cmp_impl!(impl Ord, cmp -> cmp::Ordering) /* Arithmetic */ // a/b * c/d = (a*c)/(b*d) |
