Skip to content

Commit 54b160d

Browse files
authored
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
2 parents d5aff41 + 408dc36 commit 54b160d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/liballoc/slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ impl<T> [T] {
254254

255255
/// Sorts the slice with a key extraction function.
256256
///
257-
/// This sort is stable (i.e., does not reorder equal elements) and `O(m n log(m n))`
257+
/// This sort is stable (i.e., does not reorder equal elements) and `O(m n log n)`
258258
/// worst-case, where the key function is `O(m)`.
259259
///
260260
/// For expensive key functions (e.g. functions that are not simple property accesses or

src/libcore/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1697,7 +1697,7 @@ impl<T> [T] {
16971697
/// elements.
16981698
///
16991699
/// This sort is unstable (i.e., may reorder equal elements), in-place
1700-
/// (i.e., does not allocate), and `O(m n log(m n))` worst-case, where the key function is
1700+
/// (i.e., does not allocate), and `O(m n log n)` worst-case, where the key function is
17011701
/// `O(m)`.
17021702
///
17031703
/// # Current implementation

0 commit comments

Comments
 (0)