Skip to content

Commit ed27de1

Browse files
Fmt Botgithub-actions[bot]
authored andcommitted
2025-06-15 automated rustfmt nightly
1 parent 052514e commit ed27de1

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

bitcoin/src/blockdata/transaction.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,7 @@ impl TransactionExtPriv for Transaction {
517517
1
518518
} else if witness_program.is_p2wsh() {
519519
// Treat the last item of the witness as the witnessScript
520-
witness
521-
.last()
522-
.map(Script::from_bytes)
523-
.map(|s| s.count_sigops())
524-
.unwrap_or(0)
520+
witness.last().map(Script::from_bytes).map(|s| s.count_sigops()).unwrap_or(0)
525521
} else {
526522
0
527523
}

bitcoin/src/psbt/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -891,11 +891,11 @@ impl GetKey for $map<PublicKey, PrivateKey> {
891891
KeyRequest::XOnlyPubkey(xonly) => {
892892
let pubkey_even = xonly.public_key(secp256k1::Parity::Even);
893893
let key = self.get(&pubkey_even).cloned();
894-
894+
895895
if key.is_some() {
896896
return Ok(key);
897897
}
898-
898+
899899
let pubkey_odd = xonly.public_key(secp256k1::Parity::Odd);
900900
if let Some(priv_key) = self.get(&pubkey_odd).copied() {
901901
let negated_priv_key = priv_key.negate();
@@ -928,18 +928,18 @@ impl GetKey for $map<XOnlyPublicKey, PrivateKey> {
928928
KeyRequest::XOnlyPubkey(xonly) => Ok(self.get(xonly).cloned()),
929929
KeyRequest::Pubkey(pk) => {
930930
let (xonly, parity) = pk.inner.x_only_public_key();
931-
931+
932932
if let Some(mut priv_key) = self.get(&XOnlyPublicKey::from(xonly)).cloned() {
933933
let computed_pk = priv_key.public_key(&secp);
934934
let (_, computed_parity) = computed_pk.inner.x_only_public_key();
935-
935+
936936
if computed_parity != parity {
937937
priv_key = priv_key.negate();
938938
}
939-
939+
940940
return Ok(Some(priv_key));
941941
}
942-
942+
943943
Ok(None)
944944
},
945945
KeyRequest::Bip32(_) => Err(GetKeyError::NotSupported),

bitcoin/src/taproot/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,9 @@ impl TapTree {
779779

780780
/// Returns [`TapTreeIter<'_>`] iterator for a Taproot script tree, operating in DFS order over
781781
/// tree [`ScriptLeaf`]s.
782-
pub fn script_leaves(&self) -> ScriptLeaves<'_> { ScriptLeaves { leaf_iter: self.0.leaf_nodes() } }
782+
pub fn script_leaves(&self) -> ScriptLeaves<'_> {
783+
ScriptLeaves { leaf_iter: self.0.leaf_nodes() }
784+
}
783785

784786
/// Returns the root [`TapNodeHash`] of this tree.
785787
pub fn root_hash(&self) -> TapNodeHash { self.0.hash }

units/src/fee_rate/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use core::ops;
1010

1111
#[cfg(feature = "arbitrary")]
1212
use arbitrary::{Arbitrary, Unstructured};
13-
1413
use NumOpResult as R;
1514

1615
use crate::{Amount, MathOp, NumOpError as E, NumOpResult, Weight};

0 commit comments

Comments
 (0)