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

Implement Clone for parallel iterators #456

Merged
merged 6 commits into from Oct 17, 2017

Conversation

Projects
None yet
1 participant
@cuviper
Copy link
Member

cuviper commented Oct 12, 2017

Most are simply #[derive(Clone)], except for &T sorts of iterators where we don't want the derived T: Clone.

Fixes #416.

cuviper added some commits Sep 22, 2017

Refactor the delegate macros
This essentially just pulls the `struct` definitions out of the macros.
It simplifies the macros quite a bit, and also will make it a bit easier
to customize the iterators.  e.g. deriving `Clone` on some of them.
Avoid `T: Clone` bounds deriving cloned references
`#[derive(Clone)]` is not smart about creating bounds for `&T` types of
fields, which don't really need `T: Clone` at all to be cloned.

@cuviper cuviper requested a review from nikomatsakis Oct 12, 2017

Let Debug work on iterators with closures
Like `std`, instead of a full derive, just skip over closure fields for
iterator `Debug`, as they probably don't implement `Debug`.
@cuviper

This comment has been minimized.

Copy link
Member Author

cuviper commented Oct 14, 2017

I did some Debug cleanup that touches a lot of the same lines, so I'm just adding it here.

@cuviper

This comment has been minimized.

Copy link
Member Author

cuviper commented Oct 17, 2017

bors r+

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

Merge #456
456: Implement Clone for parallel iterators r=cuviper a=cuviper

Most are simply `#[derive(Clone)]`, except for `&T` sorts of iterators where we don't want the derived `T: Clone`.

Fixes #416.
@bors

This comment has been minimized.

Copy link
Contributor

bors bot commented Oct 17, 2017

@bors bors bot merged commit 9da3633 into rayon-rs:master Oct 17, 2017

2 checks passed

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

@cuviper cuviper deleted the cuviper:clones branch Oct 18, 2018

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.