diff options
| author | Mario Carneiro <di.gama@gmail.com> | 2022-01-04 12:18:54 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-04 12:18:54 -0800 |
| commit | b9f008b1eeed6055eb36e0fae11b30e8ffc2ebfa (patch) | |
| tree | e61c1498da74e0d948438374e4587bca0cfb7592 | |
| parent | 3eb87dbe2ddd99c5334d5282e6a4d3de6d9fa6c0 (diff) | |
| download | rust-b9f008b1eeed6055eb36e0fae11b30e8ffc2ebfa.tar.gz rust-b9f008b1eeed6055eb36e0fae11b30e8ffc2ebfa.zip | |
Update wording
| -rw-r--r-- | library/alloc/src/slice.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs index 58c35dfa361..020dfcbaac6 100644 --- a/library/alloc/src/slice.rs +++ b/library/alloc/src/slice.rs @@ -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 |
