@@ -169,7 +169,7 @@ mod hack {
169
169
impl < T > [ T ] {
170
170
/// Sorts the slice.
171
171
///
172
- /// This sort is stable (i.e., does not reorder equal elements) and `O(n * log(n))` worst-case.
172
+ /// This sort is stable (i.e., does not reorder equal elements) and *O*(*n* \ * log(*n*)) worst-case.
173
173
///
174
174
/// When applicable, unstable sorting is preferred because it is generally faster than stable
175
175
/// sorting and it doesn't allocate auxiliary memory.
@@ -204,7 +204,7 @@ impl<T> [T] {
204
204
205
205
/// Sorts the slice with a comparator function.
206
206
///
207
- /// This sort is stable (i.e., does not reorder equal elements) and `O(n * log(n))` worst-case.
207
+ /// This sort is stable (i.e., does not reorder equal elements) and *O*(*n* \ * log(*n*)) worst-case.
208
208
///
209
209
/// The comparator function must define a total ordering for the elements in the slice. If
210
210
/// the ordering is not total, the order of the elements is unspecified. An order is a
@@ -258,8 +258,8 @@ impl<T> [T] {
258
258
259
259
/// Sorts the slice with a key extraction function.
260
260
///
261
- /// This sort is stable (i.e., does not reorder equal elements) and `O(m * n * log(n))`
262
- /// worst-case, where the key function is `O(m)` .
261
+ /// This sort is stable (i.e., does not reorder equal elements) and *O*(*m* \* *n* \ * log(*n*))
262
+ /// worst-case, where the key function is *O*(*m*) .
263
263
///
264
264
/// For expensive key functions (e.g. functions that are not simple property accesses or
265
265
/// basic operations), [`sort_by_cached_key`](#method.sort_by_cached_key) is likely to be
@@ -301,8 +301,8 @@ impl<T> [T] {
301
301
///
302
302
/// During sorting, the key function is called only once per element.
303
303
///
304
- /// This sort is stable (i.e., does not reorder equal elements) and `O(m * n + n * log(n))`
305
- /// worst-case, where the key function is `O(m)` .
304
+ /// This sort is stable (i.e., does not reorder equal elements) and *O*(*m* \* *n* + *n* \ * log(*n*))
305
+ /// worst-case, where the key function is *O*(*m*) .
306
306
///
307
307
/// For simple key functions (e.g., functions that are property accesses or
308
308
/// basic operations), [`sort_by_key`](#method.sort_by_key) is likely to be
@@ -946,7 +946,7 @@ where
946
946
/// 1. for every `i` in `1..runs.len()`: `runs[i - 1].len > runs[i].len`
947
947
/// 2. for every `i` in `2..runs.len()`: `runs[i - 2].len > runs[i - 1].len + runs[i].len`
948
948
///
949
- /// The invariants ensure that the total running time is `O(n * log(n))` worst-case.
949
+ /// The invariants ensure that the total running time is *O*(*n* \ * log(*n*)) worst-case.
950
950
fn merge_sort < T , F > ( v : & mut [ T ] , mut is_less : F )
951
951
where
952
952
F : FnMut ( & T , & T ) -> bool ,
0 commit comments