Skip to content

Commit e71b3b3

Browse files
authored
Rollup merge of rust-lang#112045 - Sp00ph:update_current_impl, r=Amanieu
Followup to rust-lang#111973 I somehow forgot to update the comment on `select_nth_unstable_by_key` in rust-lang#111973, so this PR fixes that. r? `@Amanieu`
2 parents 760d46e + 448a388 commit e71b3b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

library/core/src/slice/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -3113,8 +3113,9 @@ impl<T> [T] {
31133113
///
31143114
/// # Current implementation
31153115
///
3116-
/// The current algorithm is based on the quickselect portion of the same quicksort algorithm
3117-
/// used for [`sort_unstable`].
3116+
/// The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also
3117+
/// the basis for [`sort_unstable`]. The fallback algorithm is Median of Medians using Tukey's Ninther for
3118+
/// pivot selection, which guarantees linear runtime for all inputs.
31183119
///
31193120
/// [`sort_unstable`]: slice::sort_unstable
31203121
///

0 commit comments

Comments
 (0)