File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -371,11 +371,11 @@ impl<T> [T] {
371
371
372
372
/// Sorts the slice with a key extraction function.
373
373
///
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.
375
376
///
376
377
/// 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*).
379
379
///
380
380
/// For simple key functions (e.g., functions that are property accesses or
381
381
/// 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