Skip to content

Commit f1354ed

Browse files
authored
Rollup merge of rust-lang#122072 - KonradHoeffner:patch-1, r=cuviper
Refer to "slice" instead of "vector" in Ord and PartialOrd trait impl of slices The trait implementation comments of Ord and PartialOrd for slice incorrectly mention "vectors" instead of "slices". This PR fixes those two comments as requested in rust-lang#122071.
2 parents 869529a + 6223e4c commit f1354ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/slice/cmp.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ where
2424
#[stable(feature = "rust1", since = "1.0.0")]
2525
impl<T: Eq> Eq for [T] {}
2626

27-
/// Implements comparison of vectors [lexicographically](Ord#lexicographical-comparison).
27+
/// Implements comparison of slices [lexicographically](Ord#lexicographical-comparison).
2828
#[stable(feature = "rust1", since = "1.0.0")]
2929
impl<T: Ord> Ord for [T] {
3030
fn cmp(&self, other: &[T]) -> Ordering {
3131
SliceOrd::compare(self, other)
3232
}
3333
}
3434

35-
/// Implements comparison of vectors [lexicographically](Ord#lexicographical-comparison).
35+
/// Implements comparison of slices [lexicographically](Ord#lexicographical-comparison).
3636
#[stable(feature = "rust1", since = "1.0.0")]
3737
impl<T: PartialOrd> PartialOrd for [T] {
3838
fn partial_cmp(&self, other: &[T]) -> Option<Ordering> {

0 commit comments

Comments
 (0)