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

fixes to stream::min_by #162

Merged
merged 3 commits into from
Sep 10, 2019
Merged

fixes to stream::min_by #162

merged 3 commits into from
Sep 10, 2019

Conversation

montekki
Copy link
Member

@montekki montekki commented Sep 8, 2019

  1. min_by should not have a Self: Unpin bound.
  2. uses unsafe_pinned instead of an Unpin bound in the impls.
  3. leaves waker().wake_by_ref() line in place since here we are returning Poll::Pending upon receiving new elements from the inner stream and need to re-schedule ourselves to receive new elements (as in AllFuture)
  4. It's not clear at the moment how ret! macro should be used for returning types without explicit lifetimes. That's the case for Take and MinByFuture.

@yoshuawuyts
Copy link
Contributor

Ref #146.

Copy link
Contributor

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

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

LGTM!

@yoshuawuyts yoshuawuyts merged commit 272f74c into async-rs:master Sep 10, 2019
bors bot added a commit that referenced this pull request Sep 10, 2019
163: adds stream::filter_map combinator r=yoshuawuyts a=montekki

Implements a `flat_map` combinator. Currently the same about `ret!` as in #162 .

Also the naming should probably be `FilterMapStream`, but in that case `Take` stream should also change it's name i guess.

Stdlib: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.flat_map
Ref: #129 

Co-authored-by: Fedor Sakharov <[email protected]>
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