From c258430075e7028ad78de4443d2221eda95d1396 Mon Sep 17 00:00:00 2001 From: pdtfh <149602456+pdtfh@users.noreply.github.com> Date: Mon, 16 Sep 2024 20:06:56 +0200 Subject: [PATCH] fmt with nightly --- src/packed_proof.rs | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/src/packed_proof.rs b/src/packed_proof.rs index 3c7a0e0..2d33157 100644 --- a/src/packed_proof.rs +++ b/src/packed_proof.rs @@ -44,10 +44,10 @@ impl From for Proof { .collect::>(); let a = (decoded_uint_array[0], decoded_uint_array[1]); - let b = ( - [decoded_uint_array[2], decoded_uint_array[3]], - [decoded_uint_array[4], decoded_uint_array[5]], - ); + let b = ([decoded_uint_array[2], decoded_uint_array[3]], [ + decoded_uint_array[4], + decoded_uint_array[5], + ]); let c = (decoded_uint_array[6], decoded_uint_array[7]); Self(a, b, c) } @@ -93,10 +93,10 @@ pub mod test { fn test_serializing_proof_into_packed_proof() { let proof = Proof( (U256::from(1), U256::from(2)), - ( - [U256::from(3), U256::from(4)], - [U256::from(5), U256::from(6)], - ), + ([U256::from(3), U256::from(4)], [ + U256::from(5), + U256::from(6), + ]), (U256::from(7), U256::from(8)), ); @@ -117,10 +117,10 @@ pub mod test { let expected_proof = Proof( (U256::from(1), U256::from(2)), - ( - [U256::from(3), U256::from(4)], - [U256::from(5), U256::from(6)], - ), + ([U256::from(3), U256::from(4)], [ + U256::from(5), + U256::from(6), + ]), (U256::from(7), U256::from(8)), ); @@ -138,10 +138,10 @@ pub mod test { let expected_proof = Proof( (U256::from(5), U256::from(6)), - ( - [U256::from(3), U256::from(4)], - [U256::from(5), U256::from(6)], - ), + ([U256::from(3), U256::from(4)], [ + U256::from(5), + U256::from(6), + ]), (U256::from(7), U256::from(8)), ); @@ -161,11 +161,9 @@ pub mod test { assert_eq!( serialized, - serde_json::json!([ - ["0x1", "0x2"], - [["0x3", "0x4"], ["0x5", "0x6"]], - ["0x7", "0x8"] - ]) + serde_json::json!([["0x1", "0x2"], [["0x3", "0x4"], ["0x5", "0x6"]], [ + "0x7", "0x8" + ]]) ); }