about summary refs log tree commit diff
path: root/src/libcore/slice.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-05-31 10:43:52 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-01 10:31:27 -0700
commitbba701c59d84eac4e20d0796ec06db8d1cdd39cf (patch)
tree3c2109ca567bbc7e7b8d66da7282dac8f8926da6 /src/libcore/slice.rs
parentc605c2b57b412402e6b491e91852fd9dbadeb551 (diff)
downloadrust-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/libcore/slice.rs')
-rw-r--r--src/libcore/slice.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs
index 8f885dafffa..5673d0c020d 100644
--- a/src/libcore/slice.rs
+++ b/src/libcore/slice.rs
@@ -17,7 +17,7 @@
 use mem::transmute;
 use clone::Clone;
 use container::Container;
-use cmp::{PartialEq, TotalOrd, Ordering, Less, Equal, Greater};
+use cmp::{PartialEq, Ord, Ordering, Less, Equal, Greater};
 use cmp;
 use default::Default;
 use iter::*;
@@ -251,7 +251,7 @@ impl<'a, T> RandomAccessIterator<&'a [T]> for Chunks<'a, T> {
 pub mod traits {
     use super::*;
 
-    use cmp::{PartialEq, PartialOrd, TotalEq, TotalOrd, Ordering, Equiv};
+    use cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering, Equiv};
     use iter::{order, Iterator};
     use container::Container;
 
@@ -273,9 +273,9 @@ pub mod traits {
         fn ne(&self, other: &~[T]) -> bool { !self.eq(other) }
     }
 
-    impl<'a,T:TotalEq> TotalEq for &'a [T] {}
+    impl<'a,T:Eq> Eq for &'a [T] {}
 
-    impl<T:TotalEq> TotalEq for ~[T] {}
+    impl<T:Eq> Eq for ~[T] {}
 
     impl<'a,T:PartialEq, V: Vector<T>> Equiv<V> for &'a [T] {
         #[inline]
@@ -287,13 +287,13 @@ pub mod traits {
         fn equiv(&self, other: &V) -> bool { self.as_slice() == other.as_slice() }
     }
 
-    impl<'a,T:TotalOrd> TotalOrd for &'a [T] {
+    impl<'a,T:Ord> Ord for &'a [T] {
         fn cmp(&self, other: & &'a [T]) -> Ordering {
             order::cmp(self.iter(), other.iter())
         }
     }
 
-    impl<T: TotalOrd> TotalOrd for ~[T] {
+    impl<T: Ord> Ord for ~[T] {
         #[inline]
         fn cmp(&self, other: &~[T]) -> Ordering { self.as_slice().cmp(&other.as_slice()) }
     }
@@ -741,8 +741,8 @@ impl<'a,T:PartialEq> ImmutableEqVector<T> for &'a [T] {
     }
 }
 
-/// Extension methods for vectors containing `TotalOrd` elements.
-pub trait ImmutableTotalOrdVector<T: TotalOrd> {
+/// Extension methods for vectors containing `Ord` elements.
+pub trait ImmutableOrdVector<T: Ord> {
     /**
      * Binary search a sorted vector for a given element.
      *
@@ -751,7 +751,7 @@ pub trait ImmutableTotalOrdVector<T: TotalOrd> {
     fn bsearch_elem(&self, x: &T) -> Option<uint>;
 }
 
-impl<'a, T: TotalOrd> ImmutableTotalOrdVector<T> for &'a [T] {
+impl<'a, T: Ord> ImmutableOrdVector<T> for &'a [T] {
     fn bsearch_elem(&self, x: &T) -> Option<uint> {
         self.bsearch(|p| p.cmp(x))
     }