Merge rust-bitcoin/rust-bitcoin#1695: fix clippy lint
4a2f11cc49
fix clippy lint (Andrew Poelstra) Pull request description: Looks like a new clippy lint landed. ACKs for top commit: yancyribbens: ACK4a2f11cc49
tcharding: ACK4a2f11cc49
sanket1729: utACK4a2f11cc49
Tree-SHA512: 04fd77c2daeeeed99ea854731d73bcb43fbe5fbdba2e241a93a5058ca81f05dfbf6759d055236a8c70c58331d2b93d0fafd81e7cd631b636f881d9a0b1cdc5ca
This commit is contained in:
commit
cfc4fd943f
|
@ -567,7 +567,7 @@ impl TaprootBuilder {
|
||||||
if self.branch.len() < depth as usize + 1 {
|
if self.branch.len() < depth as usize + 1 {
|
||||||
// add enough nodes so that we can insert node at depth `depth`
|
// add enough nodes so that we can insert node at depth `depth`
|
||||||
let num_extra_nodes = depth as usize + 1 - self.branch.len();
|
let num_extra_nodes = depth as usize + 1 - self.branch.len();
|
||||||
self.branch.extend((0..num_extra_nodes).into_iter().map(|_| None));
|
self.branch.extend((0..num_extra_nodes).map(|_| None));
|
||||||
}
|
}
|
||||||
// Push the last node to the branch
|
// Push the last node to the branch
|
||||||
self.branch[depth as usize] = Some(node);
|
self.branch[depth as usize] = Some(node);
|
||||||
|
|
Loading…
Reference in New Issue