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

feat: add StreamExt::map_while #116

Merged
merged 2 commits into from
Nov 11, 2024
Merged

feat: add StreamExt::map_while #116

merged 2 commits into from
Nov 11, 2024

Conversation

nanoqsh
Copy link
Contributor

@nanoqsh nanoqsh commented Nov 9, 2024

I propose to add a map_while analogue from std

Copy link
Member

@notgull notgull left a comment

Choose a reason for hiding this comment

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

LGTM aside from one nit

let this = self.project();

match ready!(this.stream.poll_next(cx)) {
Some(v) => Poll::Ready((this.predicate)(v)),
Copy link
Member

Choose a reason for hiding this comment

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

It should be mentioned that this stream is not fused.

@nanoqsh nanoqsh requested a review from notgull November 10, 2024 06:18
@notgull notgull merged commit b93376f into smol-rs:master Nov 11, 2024
7 checks passed
@notgull notgull mentioned this pull request Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants