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`).
This commit is contained in:
Tobin Harding 2022-01-24 11:40:04 +11:00
parent aabf2d1681
commit a5c06e0a96
1 changed files with 4 additions and 2 deletions

View File

@ -1113,12 +1113,14 @@ mod tests {
#[test] #[test]
fn test_sighashtype_fromstr_display() { fn test_sighashtype_fromstr_display() {
let sighashtypes = vec![("SIGHASH_ALL", EcdsaSigHashType::All), let sighashtypes = vec![
("SIGHASH_ALL", EcdsaSigHashType::All),
("SIGHASH_NONE", EcdsaSigHashType::None), ("SIGHASH_NONE", EcdsaSigHashType::None),
("SIGHASH_SINGLE", EcdsaSigHashType::Single), ("SIGHASH_SINGLE", EcdsaSigHashType::Single),
("SIGHASH_ALL|SIGHASH_ANYONECANPAY", EcdsaSigHashType::AllPlusAnyoneCanPay), ("SIGHASH_ALL|SIGHASH_ANYONECANPAY", EcdsaSigHashType::AllPlusAnyoneCanPay),
("SIGHASH_NONE|SIGHASH_ANYONECANPAY", EcdsaSigHashType::NonePlusAnyoneCanPay), ("SIGHASH_NONE|SIGHASH_ANYONECANPAY", EcdsaSigHashType::NonePlusAnyoneCanPay),
("SIGHASH_SINGLE|SIGHASH_ANYONECANPAY", EcdsaSigHashType::SinglePlusAnyoneCanPay)]; ("SIGHASH_SINGLE|SIGHASH_ANYONECANPAY", EcdsaSigHashType::SinglePlusAnyoneCanPay)
];
for (s, sht) in sighashtypes { for (s, sht) in sighashtypes {
assert_eq!(sht.to_string(), s); assert_eq!(sht.to_string(), s);
assert_eq!(EcdsaSigHashType::from_str(s).unwrap(), sht); assert_eq!(EcdsaSigHashType::from_str(s).unwrap(), sht);