kyren / piccolo

An experimental stackless Lua VM implemented in pure Rust
Creative Commons Zero v1.0 Universal
1.62k stars 59 forks source link

fix: allow seed to be any size #66

Closed Jengamon closed 3 months ago

Jengamon commented 3 months ago

Fix the seed code so that instead of being fixed to [u8; 32], the SeedableRng::Seed type is allowed to be [u32; N] (through the use of std::array::from_fn), and the seed is simply the low and high bytes repeated in order, ad infinitum.

kyren commented 3 months ago

Ah yeah, good catch!