Skip to content

Commit 91fd8ef

Browse files
committed
document the unstable iter_order_by library feature
1 parent 2b8116d commit 91fd8ef

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# `iter_order_by`
2+
3+
The tracking issue for this feature is: [#64295]
4+
5+
[#64295]: https://github.com/rust-lang/rust/issues/64295
6+
7+
------------------------
8+
9+
Add `cmp_by`, `partial_cmp_by` and `eq_by` methods to `Iterator` in the same vein as `max_by` and `min_by`.

src/libcore/iter/traits/iterator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,7 +2585,7 @@ pub trait Iterator {
25852585
/// assert_eq!(xs.iter().cmp_by(&ys, |&x, &y| (x * x).cmp(&y)), Ordering::Equal);
25862586
/// assert_eq!(xs.iter().cmp_by(&ys, |&x, &y| (2 * x).cmp(&y)), Ordering::Greater);
25872587
/// ```
2588-
#[unstable(feature = "iter_order_by", issue = "0")]
2588+
#[unstable(feature = "iter_order_by", issue = "64295")]
25892589
fn cmp_by<I, F>(mut self, other: I, mut cmp: F) -> Ordering
25902590
where
25912591
Self: Sized,
@@ -2668,7 +2668,7 @@ pub trait Iterator {
26682668
/// Some(Ordering::Greater)
26692669
/// );
26702670
/// ```
2671-
#[unstable(feature = "iter_order_by", issue = "0")]
2671+
#[unstable(feature = "iter_order_by", issue = "64295")]
26722672
fn partial_cmp_by<I, F>(mut self, other: I, mut partial_cmp: F) -> Option<Ordering>
26732673
where
26742674
Self: Sized,
@@ -2733,7 +2733,7 @@ pub trait Iterator {
27332733
///
27342734
/// assert!(xs.iter().eq_by(&ys, |&x, &y| x * x == y));
27352735
/// ```
2736-
#[unstable(feature = "iter_order_by", issue = "0")]
2736+
#[unstable(feature = "iter_order_by", issue = "64295")]
27372737
fn eq_by<I, F>(mut self, other: I, mut eq: F) -> bool
27382738
where
27392739
Self: Sized,

0 commit comments

Comments
 (0)