diff --git a/bitcoin/src/blockdata/script/instruction.rs b/bitcoin/src/blockdata/script/instruction.rs index 410f6d521..6ec3d5613 100644 --- a/bitcoin/src/blockdata/script/instruction.rs +++ b/bitcoin/src/blockdata/script/instruction.rs @@ -47,7 +47,8 @@ impl Instruction<'_> { _ => None, } } - Instruction::PushBytes(bytes) => super::read_scriptint_non_minimal(bytes.as_bytes()).ok(), + Instruction::PushBytes(bytes) => + super::read_scriptint_non_minimal(bytes.as_bytes()).ok(), } } diff --git a/hashes/src/sha256/tests.rs b/hashes/src/sha256/tests.rs index 2d8d099d7..65f166e17 100644 --- a/hashes/src/sha256/tests.rs +++ b/hashes/src/sha256/tests.rs @@ -127,8 +127,7 @@ fn engine_with_state() { let data_vec: &[&[u8]] = &[&[3u8; 1], &[4u8; 63], &[5u8; 65], &[6u8; 66]]; for data in data_vec { let mut engine = engine.clone(); - let mut midstate_engine = - sha256::HashEngine::from_midstate(engine.midstate_unchecked()); + let mut midstate_engine = sha256::HashEngine::from_midstate(engine.midstate_unchecked()); assert_eq!(engine.h, midstate_engine.h); assert_eq!(engine.bytes_hashed, midstate_engine.bytes_hashed); engine.input(data); @@ -156,8 +155,7 @@ fn engine_with_state() { 0x88, 0x52, 0x7f, 0x7d, 0x8a, 0x06, 0x94, 0x20, 0x8f, 0xf1, 0xf7, 0xa9, 0xd5, 0x69, 0x09, 0x59, ]; - let midstate_engine = - sha256::HashEngine::from_midstate(sha256::Midstate::new(MIDSTATE, 64)); + let midstate_engine = sha256::HashEngine::from_midstate(sha256::Midstate::new(MIDSTATE, 64)); let hash = sha256::Hash::from_engine(midstate_engine); assert_eq!(hash, sha256::Hash(HASH_EXPECTED)); } @@ -180,8 +178,8 @@ fn hash_unoptimized() { // The midstate of an empty hash engine tagged with "TapLeaf". const TAP_LEAF_MIDSTATE: Midstate = Midstate::new( [ - 156, 224, 228, 230, 124, 17, 108, 57, 56, 179, 202, 242, 195, 15, 80, 137, 211, 243, - 147, 108, 71, 99, 110, 96, 125, 179, 62, 234, 221, 198, 240, 201, + 156, 224, 228, 230, 124, 17, 108, 57, 56, 179, 202, 242, 195, 15, 80, 137, 211, 243, 147, + 108, 71, 99, 110, 96, 125, 179, 62, 234, 221, 198, 240, 201, ], 64, );