-
-
Notifications
You must be signed in to change notification settings - Fork 461
Derive Clone for OsRng #384
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
Conversation
We could in theory also implement I think there should be no harm in cloning And adding |
Well, if Note that this is contrary to the advice currently given in the docs:
|
I touched that bit of doc in #383 with the comments from #312 (comment) in mind:
If that PR gets accepted, things should be more consistent than they were.
I don't know the answer yet. Are we confident implementing |
@pitdicker made For |
I will make another PR that add a comment like this to
Note that all but the last point are not my own ideas, but just the code from the original version. |
This only recently become possible for all platforms, and adding
Clone
toOsRng
seems in the spirit ofThreadRng
. Both are then clonable for the reason that a clone returns "another handle to the same generator".