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`.
This commit is contained in:
commit
bc7991a54e
@ -1037,7 +1037,7 @@ impl<T> [T] {
|
||||
self.sort_by(|a, b| a.cmp(b))
|
||||
}
|
||||
|
||||
/// Sorts the slice, in place, using `key` to extract a key by which to
|
||||
/// Sorts the slice, in place, using `f` to extract a key by which to
|
||||
/// order the sort by.
|
||||
///
|
||||
/// This sort is stable and `O(n log n)` worst-case but allocates
|
||||
|
Loading…
x
Reference in New Issue
Block a user