]> git.lizzy.rs Git - rust.git/commitdiff
Tighten time complexity on the doc
authormi_sawa <mi.sawa.1216+git@gmail.com>
Tue, 14 Apr 2020 14:51:03 +0000 (23:51 +0900)
committermi_sawa <mi.sawa.1216+git@gmail.com>
Tue, 14 Apr 2020 14:51:03 +0000 (23:51 +0900)
src/liballoc/slice.rs
src/libcore/slice/mod.rs

index 4ae7532d992b9b18098bd4d1176f3bd58395b73e..4171185c9701a72c56a38ec27ac009f88f25f1b3 100644 (file)
@@ -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
index 66aad3246183f5ee39f5de92d6a8ac150a19268f..4d333fbf8ed971d8561d1f8acff5def0cb4656c2 100644 (file)
@@ -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