From 95e5fb5910d192fa1fb4dcc69a92dfcb95e23653 Mon Sep 17 00:00:00 2001 From: Dmitry Vagner Date: Mon, 27 Feb 2023 22:40:39 -0800 Subject: [PATCH] cleaner rand --- evm/src/bn254_arithmetic.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evm/src/bn254_arithmetic.rs b/evm/src/bn254_arithmetic.rs index d1050560..c2f1e3d4 100644 --- a/evm/src/bn254_arithmetic.rs +++ b/evm/src/bn254_arithmetic.rs @@ -27,9 +27,9 @@ impl Fp { impl Distribution for Standard { fn sample(&self, rng: &mut R) -> Fp { - let (x0, x1, x2, x3) = rng.gen::<(u64, u64, u64, u64)>(); + let xs = rng.gen::<[u64; 4]>(); Fp { - val: U256([x0, x1, x2, x3]) % BN_BASE, + val: U256(xs) % BN_BASE, } } }