about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Rieder <michael.rieder@sonova.com>2025-08-19 11:06:45 +0200
committerMichael Rieder <michael.rieder@sonova.com>2025-08-19 11:06:45 +0200
commit41d8d85549fc90967912a32b5604801bf25d8ea7 (patch)
tree064c4b1e1b3bc04fa59b3ae740d0a83311f1f02e
parent1ddb4d0062fbe55b88e55cffc00fe8b898512536 (diff)
downloadrust-41d8d85549fc90967912a32b5604801bf25d8ea7.tar.gz
rust-41d8d85549fc90967912a32b5604801bf25d8ea7.zip
Remove hs_abs_cmp examples
-rw-r--r--library/core/src/cmp.rs14
1 files changed, 0 insertions, 14 deletions
diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs
index b407dc5f6ef..72caf203dea 100644
--- a/library/core/src/cmp.rs
+++ b/library/core/src/cmp.rs
@@ -1570,11 +1570,6 @@ pub fn min<T: Ord>(v1: T, v2: T) -> T {
 ///
 /// let result = cmp::min_by(1, -1, abs_cmp);
 /// assert_eq!(result, 1);
-///
-/// let rhs_abs_cmp = |x: &i32, y: &i32| x.cmp(&y.abs());
-///
-/// let result = cmp::min_by(-2, 1, rhs_abs_cmp);
-/// assert_eq!(result, -2);
 /// ```
 #[inline]
 #[must_use]
@@ -1670,11 +1665,6 @@ pub fn max<T: Ord>(v1: T, v2: T) -> T {
 ///
 /// let result = cmp::max_by(1, -1, abs_cmp);
 /// assert_eq!(result, -1);
-///
-/// let rhs_abs_cmp = |x: &i32, y: &i32| x.cmp(&y.abs());
-///
-/// let result = cmp::max_by(-2, 1, rhs_abs_cmp);
-/// assert_eq!(result, 1);
 /// ```
 #[inline]
 #[must_use]
@@ -1774,10 +1764,6 @@ where
 /// assert_eq!(cmp::minmax_by(-1, 2, abs_cmp), [-1, 2]);
 /// assert_eq!(cmp::minmax_by(-2, 2, abs_cmp), [-2, 2]);
 ///
-/// let rhs_abs_cmp = |x: &i32, y: &i32| x.cmp(&y.abs());
-///
-/// assert_eq!(cmp::minmax_by(-2, 1, rhs_abs_cmp), [-2, 1]);
-///
 /// // You can destructure the result using array patterns
 /// let [min, max] = cmp::minmax_by(-42, 17, abs_cmp);
 /// assert_eq!(min, 17);