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

Expose poll_next replacement on Split, Lines, DirEntry, Receiver and UnboundedReceiver #3308

Merged
merged 7 commits into from Dec 22, 2020

Conversation

Darksonn
Copy link
Contributor

This PR exposes a poll_next equivalent on some of the types whose Stream impl were removed in #3277. It also tweaks the documentation on poll_accept.

The methods are moved around in their impl blocks so they appear at the bottom of the generated documentation.

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-io Module: tokio/io M-sync Module: tokio/sync labels Dec 22, 2020
@Darksonn Darksonn changed the title Expose poll_next replacement on Split, Lines, Receiver and UnboundedReceiver Expose poll_next replacement on Split, Lines, DirEntry, Receiver and UnboundedReceiver Dec 22, 2020
@Darksonn Darksonn added the M-fs Module: tokio/fs label Dec 22, 2020
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 carllerche merged commit 0b83b3b into master Dec 22, 2020
@carllerche carllerche deleted the expose-stream-poll_next branch December 22, 2020 17:28
@sunng87
Copy link

sunng87 commented Dec 27, 2020

I'm porting a tokio 0.3 application to 1.0 currently blocked by StreamExt functions on ReadDir. It seems for now user has to wrapping these types (Lines/DirEntry) into a user-defined struct and impl Stream for that in order to use functions from StreamExt. Is this the recommended way to do so?

@Darksonn
Copy link
Contributor Author

@sunng87 Yes. You can find examples of how you can implement the wrapper in #3343.

@sunng87
Copy link

sunng87 commented Dec 28, 2020

@Darksonn Thank you! These wrappers are really needed in tokio-stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-fs Module: tokio/fs M-io Module: tokio/io M-sync Module: tokio/sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants