Skip to content

Commit bba701c

Browse files
committed
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]
1 parent c605c2b commit bba701c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+436
-431
lines changed

src/liballoc/owned.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
use core::any::{Any, AnyRefExt};
1414
use core::clone::Clone;
15-
use core::cmp::{PartialEq, PartialOrd, TotalEq, TotalOrd, Ordering};
15+
use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering};
1616
use core::default::Default;
1717
use core::fmt;
1818
use core::intrinsics;
@@ -67,11 +67,11 @@ impl<T:PartialOrd> PartialOrd for Box<T> {
6767
#[inline]
6868
fn gt(&self, other: &Box<T>) -> bool { *(*self) > *(*other) }
6969
}
70-
impl<T: TotalOrd> TotalOrd for Box<T> {
70+
impl<T: Ord> Ord for Box<T> {
7171
#[inline]
7272
fn cmp(&self, other: &Box<T>) -> Ordering { (**self).cmp(*other) }
7373
}
74-
impl<T: TotalEq> TotalEq for Box<T> {}
74+
impl<T: Eq> Eq for Box<T> {}
7575

7676
/// Extension methods for an owning `Any` trait object
7777
pub trait AnyOwnExt {

src/liballoc/rc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pointers, and then storing the parent pointers as `Weak` pointers.
2626
use core::mem::transmute;
2727
use core::cell::Cell;
2828
use core::clone::Clone;
29-
use core::cmp::{PartialEq, PartialOrd, TotalEq, TotalOrd, Ordering};
29+
use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering};
3030
use core::kinds::marker;
3131
use core::ops::{Deref, Drop};
3232
use core::option::{Option, Some, None};
@@ -157,7 +157,7 @@ impl<T: PartialEq> PartialEq for Rc<T> {
157157
fn ne(&self, other: &Rc<T>) -> bool { **self != **other }
158158
}
159159

160-
impl<T: TotalEq> TotalEq for Rc<T> {}
160+
impl<T: Eq> Eq for Rc<T> {}
161161

162162
impl<T: PartialOrd> PartialOrd for Rc<T> {
163163
#[inline(always)]
@@ -173,7 +173,7 @@ impl<T: PartialOrd> PartialOrd for Rc<T> {
173173
fn ge(&self, other: &Rc<T>) -> bool { **self >= **other }
174174
}
175175

176-
impl<T: TotalOrd> TotalOrd for Rc<T> {
176+
impl<T: Ord> Ord for Rc<T> {
177177
#[inline]
178178
fn cmp(&self, other: &Rc<T>) -> Ordering { (**self).cmp(&**other) }
179179
}

0 commit comments

Comments
 (0)