Skip to content

Commit

Permalink
Clarify that ordering is unspecified
Browse files Browse the repository at this point in the history
  • Loading branch information
digama0 committed Jan 5, 2022
1 parent b9f008b commit 06b17a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/alloc/src/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ impl<T> [T] {
///
/// During sorting, the key function is called at most once per element, by using
/// temporary storage to remember the results of key evaluation.
/// The order of calls to the key function is unspecified and may change in future versions
/// of the standard library.
///
/// 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*).
Expand Down

0 comments on commit 06b17a2

Please sign in to comment.