We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4c7517 commit a818a01Copy full SHA for a818a01
src/reseeding.rs
@@ -223,12 +223,8 @@ mod test {
223
let mut v = [0u8; FILL_BYTES_V_LEN];
224
::test::rng(321).fill_bytes(&mut v);
225
226
- // To test that `fill_bytes` actually did something, check that the
227
- // average of `v` is not 0.
228
- let mut sum = 0.0;
229
- for &x in v.iter() {
230
- sum += x as f64;
231
- }
232
- assert!(sum / v.len() as f64 != 0.0);
+ // To test that `fill_bytes` actually did something, check that not all
+ // bytes are zero.
+ assert!(!seed.iter().all(|&x| x == 0);
233
}
234
0 commit comments