Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the unstable iter_order_by library feature #64296

Merged
merged 2 commits into from Sep 25, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

document the unstable iter_order_by library feature

  • Loading branch information...
KodrAus committed Sep 8, 2019
commit 91fd8efd265b60a635aff89d1c2d0a8aea45fdf9
@@ -0,0 +1,9 @@
# `iter_order_by`

The tracking issue for this feature is: [#64295]

[#64295]: https://github.com/rust-lang/rust/issues/64295

------------------------

Add `cmp_by`, `partial_cmp_by` and `eq_by` methods to `Iterator` in the same vein as `max_by` and `min_by`.
This conversation was marked as resolved by KodrAus

This comment has been minimized.

Copy link
@scottmcm

scottmcm Sep 14, 2019

Member

I think you can just omit this; library features that are sufficiently documented by their doc-comments normally don't have a page in here.

@@ -2585,7 +2585,7 @@ pub trait Iterator {
/// assert_eq!(xs.iter().cmp_by(&ys, |&x, &y| (x * x).cmp(&y)), Ordering::Equal);
/// assert_eq!(xs.iter().cmp_by(&ys, |&x, &y| (2 * x).cmp(&y)), Ordering::Greater);
/// ```
#[unstable(feature = "iter_order_by", issue = "0")]
#[unstable(feature = "iter_order_by", issue = "64295")]
fn cmp_by<I, F>(mut self, other: I, mut cmp: F) -> Ordering
where
Self: Sized,
@@ -2668,7 +2668,7 @@ pub trait Iterator {
/// Some(Ordering::Greater)
/// );
/// ```
#[unstable(feature = "iter_order_by", issue = "0")]
#[unstable(feature = "iter_order_by", issue = "64295")]
fn partial_cmp_by<I, F>(mut self, other: I, mut partial_cmp: F) -> Option<Ordering>
where
Self: Sized,
@@ -2733,7 +2733,7 @@ pub trait Iterator {
///
/// assert!(xs.iter().eq_by(&ys, |&x, &y| x * x == y));
/// ```
#[unstable(feature = "iter_order_by", issue = "0")]
#[unstable(feature = "iter_order_by", issue = "64295")]
fn eq_by<I, F>(mut self, other: I, mut eq: F) -> bool
where
Self: Sized,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.