File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -371,11 +371,11 @@ impl<T> [T] {
371371
372372 /// Sorts the slice with a key extraction function.
373373 ///
374- /// During sorting, the key function is called only once per element.
374+ /// During sorting, the key function is called at most once per element, by using
375+ /// temporary storage to remember the results of key evaluation.
375376 ///
376377 /// This sort is stable (i.e., does not reorder equal elements) and *O*(*m* \* *n* + *n* \* log(*n*))
377- /// worst-case, where the key function is *O*(*m*). If the slice requires sorting,
378- /// the key function is called on all elements of the slice in the original order.
378+ /// worst-case, where the key function is *O*(*m*).
379379 ///
380380 /// For simple key functions (e.g., functions that are property accesses or
381381 /// basic operations), [`sort_by_key`](slice::sort_by_key) is likely to be
You can’t perform that action at this time.
0 commit comments