Skip to content

Commit

Permalink
Stabilize ordering_chaining, closes rust-lang#37053
Browse files Browse the repository at this point in the history
  • Loading branch information
aturon committed Mar 15, 2017
1 parent 86b48b2 commit 52d9682
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/libcore/cmp.rs
Original file line number Diff line number Diff line change
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 @@ -277,7 +275,7 @@ impl Ordering {
///
/// assert_eq!(result, Ordering::Less);
/// ```
#[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 @@ -293,8 +291,6 @@ impl Ordering {
/// # Examples
///
/// ```
/// #![feature(ordering_chaining)]
///
/// use std::cmp::Ordering;
///
/// let result = Ordering::Equal.then_with(|| Ordering::Less);
Expand All @@ -315,7 +311,7 @@ impl Ordering {
///
/// assert_eq!(result, Ordering::Less);
/// ```
#[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 52d9682

Please sign in to comment.