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 StreamExt::take_while, other tweaks incl. clippy #2029

Merged
merged 1 commit into from
Dec 25, 2019
Merged

Add StreamExt::take_while, other tweaks incl. clippy #2029

merged 1 commit into from
Dec 25, 2019

Conversation

vorot93
Copy link
Member

@vorot93 vorot93 commented Dec 25, 2019

This PR introduces StreamExt::take_while combinator which takes a predicate which inspects every yielded item and, when returns false, terminates the stream early.

Also this PR removes trait bounds for other combinator structs' constructors as they are essentially duplicates of those of StreamExt combinators and Stream impls.

Copy link
Member

@carllerche carllerche left a comment

Choose a reason for hiding this comment

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

Thanks!

@carllerche
Copy link
Member

Looks like you need a fmt pass

@vorot93 vorot93 requested a review from carllerche December 25, 2019 06:08
@carllerche carllerche merged commit a515f9c into tokio-rs:master Dec 25, 2019
@vorot93 vorot93 deleted the take-while branch December 28, 2019 06:25
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