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

Add an Intersperse adaptor #453

Merged
merged 2 commits into from Oct 11, 2017

Conversation

Projects
None yet
2 participants
@cuviper
Copy link
Member

cuviper commented Oct 8, 2017

Like the same from itertools, this inserts clones of an item between
each item of the parallel iterator.

Closes #385.

cuviper added some commits Oct 8, 2017

Add an Intersperse adaptor
Like the same from `itertools`, this inserts clones of an item between
each item of the parallel iterator.

Closes #385.
Test and fix edge cases of `IntersperseProducer`
`IntersperseProducer::split_at` is now a bit simpler by tracking only
`clone_first` and the total length.  Only when we convert to an iterator
do we check whether we actually need a first or last clone.
@nikomatsakis

This comment has been minimized.

Copy link
Member

nikomatsakis commented Oct 10, 2017

bors r+

bors bot added a commit that referenced this pull request Oct 11, 2017

Merge #453
453: Add an Intersperse adaptor r=nikomatsakis a=cuviper

Like the same from `itertools`, this inserts clones of an item between
each item of the parallel iterator.

Closes #385.
@bors

This comment has been minimized.

Copy link
Contributor

bors bot commented Oct 11, 2017

@bors bors bot merged commit 40fd3ca into rayon-rs:master Oct 11, 2017

2 checks passed

bors Build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@cuviper cuviper deleted the cuviper:intersperse branch Oct 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.