Skip to content

Implement Clone for PRNGs #20483

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

Merged
merged 2 commits into from
Jan 6, 2015
Merged

Implement Clone for PRNGs #20483

merged 2 commits into from
Jan 6, 2015

Conversation

nagisa
Copy link
Member

@nagisa nagisa commented Jan 3, 2015

  • Implement (derive) Clone for ChaChaRng, Isaac*Rng, StdRng and ThreadRng;
  • Derive XorShiftRng Clone implementation instead of implementing it explicitly.

OsRng is the only Rng which does not implement Clone or Copy after this patch because of its dependence on Reader.

r? @huonw I guess?

@nagisa nagisa changed the title Rng copy Implement Clone for PRNGs Jan 3, 2015
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 6, 2015
* Implement (derive) `Clone` for `ChaChaRng`, `Isaac*Rng`, `StdRng` and `ThreadRng`;
* Derive `XorShiftRng` `Clone` implementation instead of implementing it explicitly.

`OsRng` is the only Rng which does not implement `Clone` or `Copy` after this patch because of its dependence on `Reader`.

r? @huonw I guess?
@bors bors merged commit 6ca1f0c into rust-lang:master Jan 6, 2015
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.

3 participants