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

MergeJoinBy also accept functions returning bool #704

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

Philippe-Cholet
Copy link
Member

Related to #701 . The produced iterator then yields Either items instead of EitherOrBoth items when the user function returns Ordering.

@Philippe-Cholet
Copy link
Member Author

@jswrenn There is no breaking change, that's the all point of the (private) OrderingOrBool trait. The user can still give functions returning Ordering (resulting in an iterator of EitherOrBoth items). Now the user can also give functions returning bool (resulting in an iterator of Either items). ... Then we will be able to merge implementations of MergeJoinBy and MergeBy without breaking anything (which is the purpose of @phimuemue ).

src/lib.rs Show resolved Hide resolved
@Philippe-Cholet
Copy link
Member Author

I just made a last small change: "L/R" for "Left/Right" types instead of "I/J" that stand for iterators.
Should I squash all those commits ?

@phimuemue
Copy link
Member

Yes, that would be nice.

Done with `trait OrderingOrBool<L, R>`.
Now, `merge_join_by` needs an extra type parameter `T` so this is a breaking change, because any [unlikely] invocations that explicitly provided these parameters are now one parameter short.
Documentation updated, two quickcheck.
Copy link
Member

@jswrenn jswrenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this!

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 16, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit eb561e5 into rust-itertools:master Jun 16, 2023
@Philippe-Cholet Philippe-Cholet deleted the issue-701 branch June 16, 2023 22:43
@jswrenn jswrenn modified the milestones: next, v11.0.0 Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants