rust-itertools / itertools

Extra iterator adaptors, iterator methods, free functions, and macros.
https://docs.rs/itertools/
Apache License 2.0
2.72k stars 309 forks source link

Merge `Merge/MergeBy/MergeJoinBy` implementations (v2) #736

Closed Philippe-Cholet closed 1 year ago

Philippe-Cholet commented 1 year ago

Cleaner alternative to the experimental/messy #711. Closes #701. @phimuemue I would additionally rename InternalMergeJoinBy to MergeBy, making MergeJoinBy an alias of MergeBy instead. But I would like your opinion on this first. I recently found a way to not add a fourth type to MergeJoinBy (added to the old PR) but another difference is that I do not wrap with MergeFuncT anymore.

Philippe-Cholet commented 1 year ago

@phimuemue What do you think of this new version? MergeJoinBy do not have a fourth type here, as you thought possible (the small FuncLR trait that make it work seems reasonable to me).

Philippe-Cholet commented 1 year ago

Rebased after recent #751.

Philippe-Cholet commented 1 year ago

That feature was quite a ride for me. 🎉

@jswrenn Note that you are mixing different PRs with the "next" milestone.

jswrenn commented 1 year ago

What do you mean by "mixing"?

We use the next milestone to keep track of highlights that should be noted in the changelog. (Caveat: We haven't been very consistent about doing so, lately.)

Philippe-Cholet commented 1 year ago

Just that old PRs of 0.11 are with the new ones, which I noticed and found weird but if it's not an issue then case closed.