Refer to "slice" instead of "vector" in Ord and PartialOrd trait impl of slice
This commit is contained in:
parent
80399064af
commit
6223e4c734
@ -24,7 +24,7 @@ where
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T: Eq> Eq for [T] {}
|
impl<T: Eq> Eq for [T] {}
|
||||||
|
|
||||||
/// Implements comparison of vectors [lexicographically](Ord#lexicographical-comparison).
|
/// Implements comparison of slices [lexicographically](Ord#lexicographical-comparison).
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T: Ord> Ord for [T] {
|
impl<T: Ord> Ord for [T] {
|
||||||
fn cmp(&self, other: &[T]) -> Ordering {
|
fn cmp(&self, other: &[T]) -> Ordering {
|
||||||
@ -32,7 +32,7 @@ impl<T: Ord> Ord for [T] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Implements comparison of vectors [lexicographically](Ord#lexicographical-comparison).
|
/// Implements comparison of slices [lexicographically](Ord#lexicographical-comparison).
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T: PartialOrd> PartialOrd for [T] {
|
impl<T: PartialOrd> PartialOrd for [T] {
|
||||||
fn partial_cmp(&self, other: &[T]) -> Option<Ordering> {
|
fn partial_cmp(&self, other: &[T]) -> Option<Ordering> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user