From a5c06e0a96782714d5b3fbc4d6915e37c0502d24 Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Mon, 24 Jan 2022 11:40:04 +1100 Subject: [PATCH] Refactor vector initialisation Vector initialisation uses neither "Block" nor "Visual" stlye, this is irregular for no added benefit. Elect to use "Block" style (as defined by `rustfmt`). --- src/blockdata/transaction.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/blockdata/transaction.rs b/src/blockdata/transaction.rs index b97f89d0..2a88b193 100644 --- a/src/blockdata/transaction.rs +++ b/src/blockdata/transaction.rs @@ -1113,12 +1113,14 @@ mod tests { #[test] fn test_sighashtype_fromstr_display() { - let sighashtypes = vec![("SIGHASH_ALL", EcdsaSigHashType::All), + let sighashtypes = vec![ + ("SIGHASH_ALL", EcdsaSigHashType::All), ("SIGHASH_NONE", EcdsaSigHashType::None), ("SIGHASH_SINGLE", EcdsaSigHashType::Single), ("SIGHASH_ALL|SIGHASH_ANYONECANPAY", EcdsaSigHashType::AllPlusAnyoneCanPay), ("SIGHASH_NONE|SIGHASH_ANYONECANPAY", EcdsaSigHashType::NonePlusAnyoneCanPay), - ("SIGHASH_SINGLE|SIGHASH_ANYONECANPAY", EcdsaSigHashType::SinglePlusAnyoneCanPay)]; + ("SIGHASH_SINGLE|SIGHASH_ANYONECANPAY", EcdsaSigHashType::SinglePlusAnyoneCanPay) + ]; for (s, sht) in sighashtypes { assert_eq!(sht.to_string(), s); assert_eq!(EcdsaSigHashType::from_str(s).unwrap(), sht);