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

Increase discoverability of merge_join_by (Unix-like comm) #966

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,9 @@ pub trait Itertools: Iterator {
/// let b = (0..10).step_by(3);
///
/// itertools::assert_equal(
/// a.merge_join_by(b, |i, j| i.cmp(j)),
/// // This performs a diff in the style of the Unix command comm(1),
/// // generalized to arbitrary types rather than text.
/// a.merge_join_by(b, Ord::cmp),
/// vec![Both(0, 0), Left(2), Right(3), Left(4), Both(6, 6), Left(1), Right(9)]
/// );
/// ```
Expand Down Expand Up @@ -1123,6 +1125,7 @@ pub trait Itertools: Iterator {
/// );
/// ```
#[inline]
#[doc(alias = "comm")]
fn merge_join_by<J, F, T>(self, other: J, cmp_fn: F) -> MergeJoinBy<Self, J::IntoIter, F>
where
J: IntoIterator,
Expand Down
Loading