Skip to content

Commit

Permalink
Update wording
Browse files Browse the repository at this point in the history
  • Loading branch information
digama0 committed Jan 4, 2022
1 parent 3eb87db commit b9f008b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/alloc/src/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,11 @@ impl<T> [T] {

/// Sorts the slice with a key extraction function.
///
/// During sorting, the key function is called only once per element.
/// During sorting, the key function is called at most once per element, by using
/// temporary storage to remember the results of key evaluation.
///
/// This sort is stable (i.e., does not reorder equal elements) and *O*(*m* \* *n* + *n* \* log(*n*))
/// worst-case, where the key function is *O*(*m*). If the slice requires sorting,
/// the key function is called on all elements of the slice in the original order.
/// worst-case, where the key function is *O*(*m*).
///
/// For simple key functions (e.g., functions that are property accesses or
/// basic operations), [`sort_by_key`](slice::sort_by_key) is likely to be
Expand Down

0 comments on commit b9f008b

Please sign in to comment.