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

Use take_while instead of scan in impl of Product, Sum and FromStream for Option and Result #667

Merged
merged 6 commits into from
Jan 27, 2020

Conversation

olegnn
Copy link
Contributor

@olegnn olegnn commented Jan 12, 2020

Use of take_while instead of scan is much clear because

  • take_while is designed for this kind of tasks
  • Current implementation doesn't use scan state

@olegnn olegnn changed the title Use take_while instead of scan for impl of Product, Sum and FromStream for Option Use take_while instead of scan in impl of Product, Sum and FromStream for Option Jan 12, 2020
src/utils.rs Outdated Show resolved Hide resolved
@olegnn
Copy link
Contributor Author

olegnn commented Jan 17, 2020

@yoshuawuyts I finally rewrote Results implementations using take_while.

@olegnn olegnn force-pushed the option_take_while branch from 770c04d to ed7ddac Compare January 17, 2020 14:20
@olegnn olegnn changed the title Use take_while instead of scan in impl of Product, Sum and FromStream for Option Use take_while instead of scan in impl of Product, Sum and FromStream for Option and Result Jan 17, 2020
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.

Thanks heaps!

@yoshuawuyts yoshuawuyts merged commit 6c1b5eb into async-rs:master Jan 27, 2020
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