Skip to content

Commit

Permalink
Increase discoverability of merge_join_by (Unix-like comm)
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe-Cholet authored and phimuemue committed Sep 18, 2024
1 parent 91f9618 commit a31e14f
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit a31e14f

Please sign in to comment.