Skip to content

Commit

Permalink
Stabilize ordering_chaining, closes #37053
Browse files Browse the repository at this point in the history
  • Loading branch information
aturon authored and alexcrichton committed Mar 17, 2017
1 parent 37b38a2 commit 48890d4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/libcore/cmp.rs
Expand Up @@ -255,8 +255,6 @@ impl Ordering {
/// # Examples
///
/// ```
/// #![feature(ordering_chaining)]
///
/// use std::cmp::Ordering;
///
/// let result = Ordering::Equal.then(Ordering::Less);
Expand All @@ -278,7 +276,7 @@ impl Ordering {
/// assert_eq!(result, Ordering::Less);
/// ```
#[inline]
#[unstable(feature = "ordering_chaining", issue = "37053")]
#[stable(feature = "ordering_chaining", since = "1.17.0")]
pub fn then(self, other: Ordering) -> Ordering {
match self {
Equal => other,
Expand All @@ -294,8 +292,6 @@ impl Ordering {
/// # Examples
///
/// ```
/// #![feature(ordering_chaining)]
///
/// use std::cmp::Ordering;
///
/// let result = Ordering::Equal.then_with(|| Ordering::Less);
Expand All @@ -317,7 +313,7 @@ impl Ordering {
/// assert_eq!(result, Ordering::Less);
/// ```
#[inline]
#[unstable(feature = "ordering_chaining", issue = "37053")]
#[stable(feature = "ordering_chaining", since = "1.17.0")]
pub fn then_with<F: FnOnce() -> Ordering>(self, f: F) -> Ordering {
match self {
Equal => f(),
Expand Down

0 comments on commit 48890d4

Please sign in to comment.