Merge rust-bitcoin/rust-bitcoin#4621: Automated nightly rustfmt (2025-06-15)

81dbfae0a8 2025-06-15 automated rustfmt nightly (Fmt Bot)

Pull request description:

  Automated nightly `rustfmt` changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

ACKs for top commit:
  apoelstra:
    ACK 81dbfae0a8acf77bf7dce155872c7be828540573; successfully ran local tests

Tree-SHA512: 25afa058f7edff906fc43f5f5c900a76397bbc8f9fba723fb02e88d215692e5098ce0adabc67954a8466da5f28eaa672c94905e4aa5f0890930b8fabda8f15e4
This commit is contained in:
merge-script 2025-06-15 13:35:12 +00:00
commit 9852732311
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
4 changed files with 10 additions and 13 deletions

View File

@ -517,11 +517,7 @@ impl TransactionExtPriv for Transaction {
1
} else if witness_program.is_p2wsh() {
// Treat the last item of the witness as the witnessScript
witness
.last()
.map(Script::from_bytes)
.map(|s| s.count_sigops())
.unwrap_or(0)
witness.last().map(Script::from_bytes).map(|s| s.count_sigops()).unwrap_or(0)
} else {
0
}

View File

@ -779,7 +779,9 @@ impl TapTree {
/// Returns [`TapTreeIter<'_>`] iterator for a Taproot script tree, operating in DFS order over
/// tree [`ScriptLeaf`]s.
pub fn script_leaves(&self) -> ScriptLeaves<'_> { ScriptLeaves { leaf_iter: self.0.leaf_nodes() } }
pub fn script_leaves(&self) -> ScriptLeaves<'_> {
ScriptLeaves { leaf_iter: self.0.leaf_nodes() }
}
/// Returns the root [`TapNodeHash`] of this tree.
pub fn root_hash(&self) -> TapNodeHash { self.0.hash }

View File

@ -10,7 +10,6 @@ use core::ops;
#[cfg(feature = "arbitrary")]
use arbitrary::{Arbitrary, Unstructured};
use NumOpResult as R;
use crate::{Amount, MathOp, NumOpError as E, NumOpResult, Weight};