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

impl FusedFuture on Unordered::next #24

Merged
merged 1 commit into from
Apr 28, 2022
Merged

Conversation

daprilik
Copy link
Contributor

@daprilik daprilik commented Apr 27, 2022

Closes #16

Note: I had to switch next() over from an async function returning an anonymous future, to a sync function returning an explicit future. This is because leaving it as an async function doesn't propagate the new FusedFuture impl from the inner Next future on to the returned anonymous future.

Alternatively, if we really don't want to leak the Next type, we could change the signature to return an impl Future<Output = Option<<Self as PollNext>::Item>> + FusedFuture + 'a, but that's a real mouthful...

Copy link
Owner

@udoprog udoprog left a comment

Choose a reason for hiding this comment

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

One note, otherwise LGTM. Even though it seems like build_no_default_features is not doing what it's supposed to!

@udoprog udoprog merged commit e1c08d3 into udoprog:main Apr 28, 2022
@udoprog
Copy link
Owner

udoprog commented Apr 28, 2022

Thank you!

@daprilik daprilik deleted the fused-next branch April 28, 2022 16:53
@daprilik
Copy link
Contributor Author

daprilik commented Apr 28, 2022

Thanks for the quick review + merge!

Any chance you could push out a point-release with this change? It's no big rush or anything, so if you'd rather lump it in with a larger change, that's fine too.

@udoprog
Copy link
Owner

udoprog commented Apr 28, 2022

Yeah, of course. Shipped 0.9.2. Enjoy!

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.

Unordered::next does not return a FusedFuture
3 participants