Skip to content

Remove futures_[un]ordered functions #1482

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

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Mar 21, 2019

Closes #1477

@taiki-e taiki-e force-pushed the stream-re-export branch 3 times, most recently from 1732986 to 49df44b Compare March 21, 2019 23:40
@taiki-e taiki-e changed the title Expose stream::IterMut and stream::IterPinMut Expose stream::futures_unordered Mar 21, 2019
@taiki-e taiki-e force-pushed the stream-re-export branch 3 times, most recently from a1c2a72 to 19561e9 Compare March 28, 2019 18:40
@taiki-e taiki-e changed the title Expose stream::futures_unordered Expose FuturesUnorderedIter*Mut Mar 28, 2019
@Nemo157
Copy link
Member

Nemo157 commented Mar 29, 2019

Personally I'd go for @cramertj's proposal in the linked issue, remove the futures_unordered function and use FuturesUnordered::from_iter instead. Then the iterators can be namespaced away since they're going to be very rarely used types.

Probably good to wait and see if @cramertj's opinion has changed since then though.

@taiki-e taiki-e changed the title Expose FuturesUnorderedIter*Mut Remove futures_[un]ordered functions Mar 29, 2019
@taiki-e taiki-e force-pushed the stream-re-export branch 2 times, most recently from 2d9af09 to 149e1b9 Compare April 1, 2019 17:15
@cramertj
Copy link
Member

cramertj commented Apr 1, 2019

I don't have a strong opinion either way. @Nemo157 feel free to review this and merge if it matches your expectations.

@Nemo157 Nemo157 force-pushed the stream-re-export branch from 149e1b9 to 1584844 Compare April 3, 2019 15:58
@Nemo157 Nemo157 merged commit 9100ea4 into rust-lang:master Apr 3, 2019
@Nemo157
Copy link
Member

Nemo157 commented Apr 3, 2019

Thanks, this looks great.

@taiki-e taiki-e deleted the stream-re-export branch April 3, 2019 17:36
@olivia-fl
Copy link

I don't know if I'm missing something, but what should people be doing instead of futures_ordered now?

@Nemo157
Copy link
Member

Nemo157 commented Apr 9, 2019

@Benjamin-L you can use the FromIterator implementation of FuturesOrdered. Either by using some_futures.into_iter().collect::<FuturesOrdered>() or use std::iter::FromIterator; FuturesOrdered::from_iter(some_futures); (I really wish that FromIterator made it into the prelude so that that could be the goto recommendation).

@Arnavion
Copy link
Contributor

Needs to be mentioned in the alpha.14 changelog since it's a breaking change. (Took me a bunch of git-blame-ing to discover this.)

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.

Iterators for FuturesUnordered are private
5 participants