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/libstd/slice.rs | |
| 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/libstd/slice.rs')
| -rw-r--r-- | src/libstd/slice.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/slice.rs b/src/libstd/slice.rs index 430629a1f88..5753663dd87 100644 --- a/src/libstd/slice.rs +++ b/src/libstd/slice.rs @@ -65,7 +65,7 @@ Vectors are a very useful type, and so there's several implementations of traits from other modules. Some notable examples: * `Clone` -* `Eq`, `Ord`, `TotalEq`, `TotalOrd` -- vectors can be compared, +* `Eq`, `Ord`, `Eq`, `Ord` -- vectors can be compared, if the element type defines the corresponding trait. ## Iteration @@ -101,7 +101,7 @@ There are a number of free functions that create or take vectors, for example: use mem::transmute; use clone::Clone; -use cmp::{TotalOrd, Ordering, Less, Greater}; +use cmp::{Ord, Ordering, Less, Greater}; use cmp; use container::Container; use iter::*; @@ -117,7 +117,7 @@ use vec::Vec; pub use core::slice::{ref_slice, mut_ref_slice, Splits, Windows}; pub use core::slice::{Chunks, Vector, ImmutableVector, ImmutableEqVector}; -pub use core::slice::{ImmutableTotalOrdVector, MutableVector, Items, MutItems}; +pub use core::slice::{ImmutableOrdVector, MutableVector, Items, MutItems}; pub use core::slice::{MutSplits, MutChunks}; pub use core::slice::{bytes, MutableCloneableVector}; @@ -698,7 +698,7 @@ impl<'a,T> MutableVectorAllocating<'a, T> for &'a mut [T] { /// Methods for mutable vectors with orderable elements, such as /// in-place sorting. -pub trait MutableTotalOrdVector<T> { +pub trait MutableOrdVector<T> { /// Sort the vector, in place. /// /// This is equivalent to `self.sort_by(|a, b| a.cmp(b))`. @@ -714,7 +714,7 @@ pub trait MutableTotalOrdVector<T> { fn sort(self); } -impl<'a, T: TotalOrd> MutableTotalOrdVector<T> for &'a mut [T] { +impl<'a, T: Ord> MutableOrdVector<T> for &'a mut [T] { #[inline] fn sort(self) { self.sort_by(|a,b| a.cmp(b)) |
