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/libstd/slice.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libstd/slice.rs') 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 { +pub trait MutableOrdVector { /// Sort the vector, in place. /// /// This is equivalent to `self.sort_by(|a, b| a.cmp(b))`. @@ -714,7 +714,7 @@ pub trait MutableTotalOrdVector { fn sort(self); } -impl<'a, T: TotalOrd> MutableTotalOrdVector for &'a mut [T] { +impl<'a, T: Ord> MutableOrdVector for &'a mut [T] { #[inline] fn sort(self) { self.sort_by(|a,b| a.cmp(b)) -- cgit 1.4.1-3-g733a5