workaround trng trait inconsistency

0.5.1 rand_core needed for the dalek crates
0.6.3 traits everywhere else
what a mess

turns out i can just use fill_via_next() to do the same thing
without having to step on cross-generation traits. whew.

(also not in tree but doing a quick manual test that fill_via_next()
is not totally broken)
This commit is contained in:
bunnie 2023-02-27 02:09:07 +08:00
parent 8690d955d0
commit b329023091

View file

@ -48,7 +48,7 @@ impl XousRng256 {
impl Rng256 for XousRng256 {
fn gen_uniform_u8x32(&mut self) -> [u8; 32] {
let mut buf: [u8; 32] = [Default::default(); 32];
self.trng.fill_bytes(&mut buf);
self.trng.fill_bytes_via_next(&mut buf);
buf
}
}