From 90726a58661231672eac9d2c8797cdcdf5c040b8 Mon Sep 17 00:00:00 2001 From: Nicholas Ward Date: Wed, 30 Nov 2022 17:47:41 -0800 Subject: [PATCH] fmt --- evm/src/cpu/kernel/tests/hash.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/evm/src/cpu/kernel/tests/hash.rs b/evm/src/cpu/kernel/tests/hash.rs index c07eb042..91ec6d78 100644 --- a/evm/src/cpu/kernel/tests/hash.rs +++ b/evm/src/cpu/kernel/tests/hash.rs @@ -56,7 +56,10 @@ fn make_input_stack(message: Vec) -> Vec { initial_stack } -fn test_hash_256(hash_fn_label: &str, standard_implementation: &dyn Fn(Vec) -> U256) -> Result<()> { +fn test_hash_256( + hash_fn_label: &str, + standard_implementation: &dyn Fn(Vec) -> U256, +) -> Result<()> { // Make the input. let message_random = make_random_input(); let message_custom = make_custom_input(); @@ -89,12 +92,18 @@ fn test_hash_256(hash_fn_label: &str, standard_implementation: &dyn Fn(Vec) fn combine_u256s(hi: U256, lo: U256) -> U512 { let mut result = U512::from(hi); - result *= U512::from_big_endian(&[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]); + result *= U512::from_big_endian(&[ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, + ]); result += U512::from(lo); result } -fn test_hash_512(hash_fn_label: &str, standard_implementation: &dyn Fn(Vec) -> U512) -> Result<()> { +fn test_hash_512( + hash_fn_label: &str, + standard_implementation: &dyn Fn(Vec) -> U512, +) -> Result<()> { // Make the input. let message_random = make_random_input(); let message_custom = make_custom_input();