serde for BlockRng, ReseedingRng and ReadRng#1130
Conversation
|
I don't have an opinion on I think I agree that the implementation for |
|
I think Review? |
vks
left a comment
There was a problem hiding this comment.
Looks great! Maybe you could also update the changelog?
|
I'll get to the changelog later. Once current PRs are merged I think we should do the next patch release (don't think there's any breaking changes). |
Closes #1101, which also discussed serde for other RNGs.
ReadRng: probably useless?ReseedingRng: probably useless since the reseeder will normally be a non-deterministic RNGBlockRng: required forReseedingRngand I guess was never picked up in previous tests?rand/serde1now requiresrand_core/serde1, required forReseedingRngand probably sensibleOsRng: useless, and easy to skip as a field in structsStdRngorSmallRng: as @kazcw points out, non-stable serialisation would be a pit-fallHc128Rng: would require https://crates.io/crates/serde-big-array or some workaround until some future MSRV bump but I doubt anyone cares anywayI'm tempted to remove the
ReadRngand possiblyReseedingRngsupport but there doesn't seem a good reason either way. Thoughts?