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

stream: add StreamExt::skip #2204

Merged
merged 5 commits into from
Feb 1, 2020
Merged

Conversation

torepettersen
Copy link
Contributor

This PR introduces StreamExt::skip as described in #2104. Skip will create a new stream the skips the n first elements of the underlaying stream.

skip version of take

Refs: tokio-rs#2104
tokio/src/stream/mod.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

The other stream combinator types are currently not exported publicly.

tokio/src/stream/skip.rs Outdated Show resolved Hide resolved
@Darksonn
Copy link
Contributor

Darksonn commented Feb 1, 2020

Did you mean to include that skip_while.rs file?

@torepettersen
Copy link
Contributor Author

Did you mean to include that skip_while.rs file?

No, sorry. I will be working on that next.

Also does anyone know why rustfmt is failing?

@Darksonn
Copy link
Contributor

Darksonn commented Feb 1, 2020

Also does anyone know why rustfmt is failing?

It wants a semicolon on your return, and to remove the comma after the } in the match block.

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.

Looks great 👍 thanks!

@carllerche carllerche merged commit 1a5de2c into tokio-rs:master Feb 1, 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.

None yet

4 participants