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

add StreamingIteratorMut::flatten #27

Merged
merged 8 commits into from
Sep 8, 2022
Merged

Conversation

LorenzSchueler
Copy link
Contributor

@LorenzSchueler LorenzSchueler commented Aug 17, 2022

  • add StreamingIteratorMut::flatten
  • add Flatten
  • add impl StreamingIterator for Flatten
  • add impl StreamingIteratorMut for Flatten
  • add test
  • fix clippy warnings

Copy link
Collaborator

@cuviper cuviper left a comment

Choose a reason for hiding this comment

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

This is clever to build Flatten on StreamingIteratorMut! That gives it a kind of superpower that the regular FlatMap can't match with just identity, since this can iterate the borrowed inner iterator in-place.

src/lib.rs Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@LorenzSchueler
Copy link
Contributor Author

Thanks for the review. I agree with your suggestions. Currently I am on vacation but I will follow up on this once I get back.
(In case you want to merge this earlier feel free to apply the changes yourself.)

@LorenzSchueler
Copy link
Contributor Author

LorenzSchueler commented Sep 6, 2022

I opened #28 for the clippy warnings

src/lib.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@cuviper cuviper left a comment

Choose a reason for hiding this comment

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

I rebased and added a couple more fixes for the things below. If that looks good to you, then I think we're all set!

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
@LorenzSchueler
Copy link
Contributor Author

looks good to me :)

@cuviper cuviper merged commit 8f433f6 into sfackler:master Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants