logo
pub fn fill_bytes_via_next<R: RngCore + ?Sized>(rng: &mut R, dest: &mut [u8])
Expand description

Implement fill_bytes via next_u64 and next_u32, little-endian order.

The fastest way to fill a slice is usually to work as long as possible with integers. That is why this method mostly uses next_u64, and only when there are 4 or less bytes remaining at the end of the slice it uses next_u32 once.