Skip to content

Commit bc7991a

Browse files
author
Jonathan Turner
authored
Rollup merge of #36600 - caipre:sort-by-key-comment-fix, r=apasel422
Minor correction in `sort_by_key` doc comment The parameter to `sort_by_key` is named `f`, not `key`.
2 parents 5d4c0ed + 429ba7b commit bc7991a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcollections/slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ impl<T> [T] {
10371037
self.sort_by(|a, b| a.cmp(b))
10381038
}
10391039

1040-
/// Sorts the slice, in place, using `key` to extract a key by which to
1040+
/// Sorts the slice, in place, using `f` to extract a key by which to
10411041
/// order the sort by.
10421042
///
10431043
/// This sort is stable and `O(n log n)` worst-case but allocates

0 commit comments

Comments
 (0)