Skip to content

Commit

Permalink
Run the formatter
Browse files Browse the repository at this point in the history
Run `just fmt`, no other manual changes.
  • Loading branch information
tcharding committed Feb 5, 2025
1 parent 7be0db7 commit 85e0330
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion bitcoin/src/blockdata/script/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}

Expand Down
10 changes: 4 additions & 6 deletions hashes/src/sha256/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
}
Expand All @@ -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,
);
Expand Down

0 comments on commit 85e0330

Please sign in to comment.