Rollup merge of #71133 - MiSawa:fix-sort-by-key-doc, r=Dylan-DPC
Tighten time complexity on the doc of sort_by_key Fixes #71132
This commit is contained in:
commit
54b160d764
@ -254,7 +254,7 @@ pub fn sort_by<F>(&mut self, mut compare: F)
|
||||
|
||||
/// Sorts the slice with a key extraction function.
|
||||
///
|
||||
/// This sort is stable (i.e., does not reorder equal elements) and `O(m n log(m n))`
|
||||
/// This sort is stable (i.e., does not reorder equal elements) and `O(m n log n)`
|
||||
/// worst-case, where the key function is `O(m)`.
|
||||
///
|
||||
/// For expensive key functions (e.g. functions that are not simple property accesses or
|
||||
|
@ -1697,7 +1697,7 @@ pub fn sort_unstable_by<F>(&mut self, mut compare: F)
|
||||
/// elements.
|
||||
///
|
||||
/// This sort is unstable (i.e., may reorder equal elements), in-place
|
||||
/// (i.e., does not allocate), and `O(m n log(m n))` worst-case, where the key function is
|
||||
/// (i.e., does not allocate), and `O(m n log n)` worst-case, where the key function is
|
||||
/// `O(m)`.
|
||||
///
|
||||
/// # Current implementation
|
||||
|
Loading…
Reference in New Issue
Block a user