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:
Jonathan Turner 2016-09-22 11:25:02 -07:00 committed by GitHub
commit bc7991a54e

View File

@ -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