Skip to content

Commit 90c4f38

Browse files
committed
clippy: fix the items_after_statemnts lint
1 parent 8abf2ba commit 90c4f38

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/taproot.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -867,18 +867,19 @@ mod tests{
867867

868868
#[test]
869869
fn test_midstates() {
870-
// test that engine creation roundtrips
871-
assert_eq!(tag_engine("TapLeaf/elements").midstate(), TapLeafTag::engine().midstate());
872-
assert_eq!(tag_engine("TapBranch/elements").midstate(), TapBranchTag::engine().midstate());
873-
assert_eq!(tag_engine("TapTweak/elements").midstate(), TapTweakTag::engine().midstate());
874-
assert_eq!(tag_engine("TapSighash/elements").midstate(), TapSighashTag::engine().midstate());
875-
876870
// check that hash creation is the same as building into the same engine
877871
fn empty_hash(tag_name: &str) -> [u8; 32] {
878872
let mut e = tag_engine(tag_name);
879873
e.input(&[]);
880874
sha256::Hash::from_engine(e).to_byte_array()
881875
}
876+
877+
// test that engine creation roundtrips
878+
assert_eq!(tag_engine("TapLeaf/elements").midstate(), TapLeafTag::engine().midstate());
879+
assert_eq!(tag_engine("TapBranch/elements").midstate(), TapBranchTag::engine().midstate());
880+
assert_eq!(tag_engine("TapTweak/elements").midstate(), TapTweakTag::engine().midstate());
881+
assert_eq!(tag_engine("TapSighash/elements").midstate(), TapSighashTag::engine().midstate());
882+
882883
assert_eq!(empty_hash("TapLeaf/elements"), TapLeafHash::hash(&[]).to_byte_array());
883884
assert_eq!(empty_hash("TapBranch/elements"), TapNodeHash::hash(&[]).to_byte_array());
884885
assert_eq!(empty_hash("TapTweak/elements"), TapTweakHash::hash(&[]).to_byte_array());

0 commit comments

Comments
 (0)