Skip to content

Commit

Permalink
Added ser/de to SmallRng, as it
Browse files Browse the repository at this point in the history
wraps `Rng`, which is ser/de as well.
  • Loading branch information
CGMossa committed Dec 5, 2023
1 parent ef89cbe commit 5a290ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rngs/small.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use rand_core::{Error, RngCore, SeedableRng};

#[cfg(feature = "serde1")] use serde::{Deserialize, Serialize};

#[cfg(target_pointer_width = "64")]
type Rng = super::xoshiro256plusplus::Xoshiro256PlusPlus;
#[cfg(not(target_pointer_width = "64"))]
Expand Down Expand Up @@ -77,6 +79,7 @@ type Rng = super::xoshiro128plusplus::Xoshiro128PlusPlus;
/// [rand_chacha]: https://crates.io/crates/rand_chacha
/// [rand_xoshiro]: https://crates.io/crates/rand_xoshiro
#[cfg_attr(doc_cfg, doc(cfg(feature = "small_rng")))]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct SmallRng(Rng);

Expand Down

0 comments on commit 5a290ea

Please sign in to comment.