Skip to content

add StreamingIteratorMut::flatten#27

Merged
cuviper merged 8 commits into
sfackler:masterfrom
LorenzSchueler:master
Sep 8, 2022
Merged

add StreamingIteratorMut::flatten#27
cuviper merged 8 commits into
sfackler:masterfrom
LorenzSchueler:master

Conversation

@LorenzSchueler

@LorenzSchueler LorenzSchueler commented Aug 17, 2022

Copy link
Copy Markdown
Contributor
  • add StreamingIteratorMut::flatten
  • add Flatten
  • add impl StreamingIterator for Flatten
  • add impl StreamingIteratorMut for Flatten
  • add test
  • fix clippy warnings

@cuviper cuviper left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread src/lib.rs
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs
Comment thread src/lib.rs
Comment thread src/lib.rs
@LorenzSchueler

Copy link
Copy Markdown
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

LorenzSchueler commented Sep 6, 2022

Copy link
Copy Markdown
Contributor Author

I opened #28 for the clippy warnings

Comment thread src/lib.rs Outdated

@cuviper cuviper left a comment

Copy link
Copy Markdown
Collaborator

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!

Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs
@LorenzSchueler

Copy link
Copy Markdown
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