about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-04-14 23:29:59 +0200
committerGitHub <noreply@github.com>2020-04-14 23:29:59 +0200
commit54b160d764f13955709258caef5b35ff95edb603 (patch)
tree46cafa48eb7e0208db54750914d4e3fa5f13fbca
parentd5aff41167270b45fd14ccb65e51b81713f0539e (diff)
parent408dc369804d53254aea6409c35eea43e6e460b1 (diff)
downloadrust-54b160d764f13955709258caef5b35ff95edb603.tar.gz
rust-54b160d764f13955709258caef5b35ff95edb603.zip
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
-rw-r--r--src/liballoc/slice.rs2
-rw-r--r--src/libcore/slice/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs
index 4ae7532d992..4171185c970 100644
--- a/src/liballoc/slice.rs
+++ b/src/liballoc/slice.rs
@@ -254,7 +254,7 @@ impl<T> [T] {
 
     /// 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
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index 66aad324618..4d333fbf8ed 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/mod.rs
@@ -1697,7 +1697,7 @@ impl<T> [T] {
     /// 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