From cac8af12d7b2e6d7a806ce3277b601411d124ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Rodr=C3=ADguez=20Chatruc?= <49622509+jrchatruc@users.noreply.github.com> Date: Fri, 19 Apr 2024 15:50:29 -0300 Subject: [PATCH] Fix cargo fmt (#265) --- tests/tests/ecpairing_tests.rs | 46 ++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/tests/tests/ecpairing_tests.rs b/tests/tests/ecpairing_tests.rs index 47acee52..c32621fc 100644 --- a/tests/tests/ecpairing_tests.rs +++ b/tests/tests/ecpairing_tests.rs @@ -364,8 +364,12 @@ async fn ecpairing_fuzz_positive() { ]; for input in inputs { let input_bytes = Some(Bytes::from(hex::decode(input).unwrap())); - let eth_response = eth_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes.clone()).await.unwrap(); - let era_response = era_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes).await.unwrap(); + let eth_response = eth_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes.clone()) + .await + .unwrap(); + let era_response = era_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes) + .await + .unwrap(); let (era_output, gas_used) = parse_call_result(&era_response); write_ecpairing_gas_result(gas_used); assert_eq!(era_output.len(), 32); @@ -385,8 +389,12 @@ async fn ecpairing_fuzz_negative() { ]; for input in inputs { let input_bytes = Some(Bytes::from(hex::decode(input).unwrap())); - let eth_response = eth_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes.clone()).await.unwrap(); - let era_response = era_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes).await.unwrap(); + let eth_response = eth_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes.clone()) + .await + .unwrap(); + let era_response = era_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes) + .await + .unwrap(); let (era_output, gas_used) = parse_call_result(&era_response); write_ecpairing_gas_result(gas_used); assert_eq!(era_output.len(), 32); @@ -414,8 +422,14 @@ async fn ecpairing_fuzz_invalid_g1_point() { ]; for input in inputs { let input_bytes = Some(Bytes::from(hex::decode(input).unwrap())); - assert!(eth_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes.clone()).await.is_err()); - assert!(era_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes).await.is_err()); + assert!( + eth_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes.clone()) + .await + .is_err() + ); + assert!(era_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes) + .await + .is_err()); } } @@ -439,8 +453,14 @@ async fn ecpairing_fuzz_invalid_g2_point() { ]; for input in inputs { let input_bytes = Some(Bytes::from(hex::decode(input).unwrap())); - assert!(eth_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes.clone()).await.is_err()); - assert!(era_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes).await.is_err()); + assert!( + eth_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes.clone()) + .await + .is_err() + ); + assert!(era_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes) + .await + .is_err()); } } @@ -529,7 +549,13 @@ async fn ecpairing_fuzz_invalid_g2_subgroup() { ]; for input in inputs { let input_bytes = Some(Bytes::from(hex::decode(input).unwrap())); - assert!(eth_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes.clone()).await.is_err()); - assert!(era_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes).await.is_err()); + assert!( + eth_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes.clone()) + .await + .is_err() + ); + assert!(era_call(ECPAIRING_PRECOMPILE_ADDRESS, None, input_bytes) + .await + .is_err()); } }