Skip to content

Commit a3360b6

Browse files
committed
Use chunks_exact
Now that we are going to bump the MSRV above 1.31 we can use `chunks_exact`.
1 parent d09e922 commit a3360b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/util/taproot.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,13 +683,13 @@ impl TaprootMerkleBranch {
683683
Err(TaprootError::InvalidMerkleTreeDepth(sl.len() / TAPROOT_CONTROL_NODE_SIZE))
684684
} else {
685685
let inner = sl
686-
// TODO: Use chunks_exact after MSRV changes to 1.31
687-
.chunks(TAPROOT_CONTROL_NODE_SIZE)
686+
.chunks_exact(TAPROOT_CONTROL_NODE_SIZE)
688687
.map(|chunk| {
689688
sha256::Hash::from_slice(chunk)
690-
.expect("chunk exact always returns the correct size")
689+
.expect("chunks_exact always returns the correct size")
691690
})
692691
.collect();
692+
693693
Ok(TaprootMerkleBranch(inner))
694694
}
695695
}

0 commit comments

Comments
 (0)