Skip to content

Commit 41d8d85

Browse files
committed
Remove hs_abs_cmp examples
1 parent 1ddb4d0 commit 41d8d85

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

library/core/src/cmp.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,11 +1570,6 @@ pub fn min<T: Ord>(v1: T, v2: T) -> T {
15701570
///
15711571
/// let result = cmp::min_by(1, -1, abs_cmp);
15721572
/// assert_eq!(result, 1);
1573-
///
1574-
/// let rhs_abs_cmp = |x: &i32, y: &i32| x.cmp(&y.abs());
1575-
///
1576-
/// let result = cmp::min_by(-2, 1, rhs_abs_cmp);
1577-
/// assert_eq!(result, -2);
15781573
/// ```
15791574
#[inline]
15801575
#[must_use]
@@ -1670,11 +1665,6 @@ pub fn max<T: Ord>(v1: T, v2: T) -> T {
16701665
///
16711666
/// let result = cmp::max_by(1, -1, abs_cmp);
16721667
/// assert_eq!(result, -1);
1673-
///
1674-
/// let rhs_abs_cmp = |x: &i32, y: &i32| x.cmp(&y.abs());
1675-
///
1676-
/// let result = cmp::max_by(-2, 1, rhs_abs_cmp);
1677-
/// assert_eq!(result, 1);
16781668
/// ```
16791669
#[inline]
16801670
#[must_use]
@@ -1774,10 +1764,6 @@ where
17741764
/// assert_eq!(cmp::minmax_by(-1, 2, abs_cmp), [-1, 2]);
17751765
/// assert_eq!(cmp::minmax_by(-2, 2, abs_cmp), [-2, 2]);
17761766
///
1777-
/// let rhs_abs_cmp = |x: &i32, y: &i32| x.cmp(&y.abs());
1778-
///
1779-
/// assert_eq!(cmp::minmax_by(-2, 1, rhs_abs_cmp), [-2, 1]);
1780-
///
17811767
/// // You can destructure the result using array patterns
17821768
/// let [min, max] = cmp::minmax_by(-42, 17, abs_cmp);
17831769
/// assert_eq!(min, 17);

0 commit comments

Comments
 (0)