Skip to content

Commit 9896b38

Browse files
committed
Clarify time complexity
1 parent ca3bed0 commit 9896b38

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/liballoc/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@
113113
#![feature(slice_get_slice)]
114114
#![feature(slice_patterns)]
115115
#![feature(slice_rsplit)]
116-
#![feature(slice_sort_by_cached_key)]
117116
#![feature(specialization)]
118117
#![feature(staged_api)]
119118
#![feature(str_internals)]

src/liballoc/slice.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ impl<T> [T] {
13031303

13041304
/// Sorts the slice with a key extraction function.
13051305
///
1306-
/// This sort is stable (i.e. does not reorder equal elements) and `O(m n log m n)`
1306+
/// This sort is stable (i.e. does not reorder equal elements) and `O(m n log(m n))`
13071307
/// worst-case, where the key function is `O(m)`.
13081308
///
13091309
/// For expensive key functions (e.g. functions that are not simple property accesses or
@@ -1365,6 +1365,7 @@ impl<T> [T] {
13651365
/// # Examples
13661366
///
13671367
/// ```
1368+
/// #![feature(slice_sort_by_cached_key)]
13681369
/// let mut v = [-5i32, 4, 32, -3, 2];
13691370
///
13701371
/// v.sort_by_cached_key(|k| k.to_string());
@@ -1480,7 +1481,7 @@ impl<T> [T] {
14801481
/// elements.
14811482
///
14821483
/// This sort is unstable (i.e. may reorder equal elements), in-place (i.e. does not allocate),
1483-
/// and `O(m n log m n)` worst-case, where the key function is `O(m)`.
1484+
/// and `O(m n log(m n))` worst-case, where the key function is `O(m)`.
14841485
///
14851486
/// # Current implementation
14861487
///

0 commit comments

Comments
 (0)