/// # Examples
///
/// ```
- /// #![feature(ord_max_min)]
- ///
/// assert_eq!(2, 1.max(2));
/// assert_eq!(2, 2.max(2));
/// ```
- #[unstable(feature = "ord_max_min", issue = "25663")]
+ #[stable(feature = "ord_max_min", since = "1.22.0")]
fn max(self, other: Self) -> Self
where Self: Sized {
if other >= self { other } else { self }
/// # Examples
///
/// ```
- /// #![feature(ord_max_min)]
- ///
/// assert_eq!(1, 1.min(2));
/// assert_eq!(2, 2.min(2));
/// ```
- #[unstable(feature = "ord_max_min", issue = "25663")]
+ #[stable(feature = "ord_max_min", since = "1.22.0")]
fn min(self, other: Self) -> Self
where Self: Sized {
if self <= other { self } else { other }