From bba701c59d84eac4e20d0796ec06db8d1cdd39cf Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 31 May 2014 10:43:52 -0700 Subject: 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] --- src/libnum/bigint.rs | 10 +++++----- src/libnum/rational.rs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libnum') 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 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) -- cgit 1.4.1-3-g733a5