Skip to content

Commit

Permalink
Update library/core/src/slice/mod.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Ibraheem Ahmed <[email protected]>
  • Loading branch information
2 people authored and gitbot committed Mar 4, 2025
1 parent fe1379a commit c9f38ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3229,8 +3229,7 @@ impl<T> [T] {
/// ```
/// let mut v = [-5i32, 4, 1, -3, 2];
///
/// // Find the items <= the median absolute value, the median absolute value, and >= the median
/// // absolute value.
/// // Find the items `<=` to the absolute median, the absolute median itself, and the items `>=` to it.
/// let (lesser, median, greater) = v.select_nth_unstable_by_key(2, |a| a.abs());
///
/// assert!(lesser == [1, 2] || lesser == [2, 1]);
Expand Down

0 comments on commit c9f38ea

Please sign in to comment.