Skip to content

Commit 5d78f3c

Browse files
committed
Merge rust-bitcoin#5046: Automated nightly rustfmt (2025-09-28)
dbce025 2025-09-28 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: tcharding: ACK dbce025 apoelstra: ACK dbce025; successfully ran local tests Tree-SHA512: 0c0e41ad17af969cc05f6c5401ee0062c4ae5bfef6af16713214e3a7a60e250bf263b7f0ac7f49cc1e2e6c41b0390d389c979479854445447cdee81700caf932
2 parents 2167038 + dbce025 commit 5d78f3c

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

bitcoin/src/blockdata/script/tests.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,10 @@ fn iterator() {
747747

748748
assert_eq!(
749749
v_min,
750-
vec![(0, Instruction::PushBytes([105].as_ref())), (2, Instruction::Op(opcodes::all::OP_NOP3))]
750+
vec![
751+
(0, Instruction::PushBytes([105].as_ref())),
752+
(2, Instruction::Op(opcodes::all::OP_NOP3))
753+
]
751754
);
752755

753756
assert_eq!(v_nonmin.unwrap_err(), Error::NonMinimalPush);

fuzz/fuzz_targets/bitcoin/arbitrary_block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use arbitrary::{Arbitrary, Unstructured};
22
use bitcoin::block::{self, Block, BlockCheckedExt as _};
3-
use honggfuzz::fuzz;
43
use bitcoin::consensus::{deserialize, serialize};
4+
use honggfuzz::fuzz;
55

66
fn do_test(data: &[u8]) {
77
let mut u = Unstructured::new(data);

fuzz/fuzz_targets/bitcoin/arbitrary_script.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
use arbitrary::{Arbitrary, Unstructured};
2-
use honggfuzz::fuzz;
3-
4-
use bitcoin::{Network};
52
use bitcoin::address::Address;
63
use bitcoin::consensus::serialize;
74
use bitcoin::script::{self, ScriptBuf, ScriptExt as _, ScriptPubKeyExt as _};
5+
use bitcoin::Network;
6+
use honggfuzz::fuzz;
87

98
fn do_test(data: &[u8]) {
109
let mut u = Unstructured::new(data);
1110
let s = ScriptBuf::arbitrary(&mut u);
1211

1312
if let Ok(script_buf) = s {
1413
let serialized = serialize(&script_buf);
15-
let _ : Result<Vec<script::Instruction>, script::Error> = script_buf.instructions().collect();
14+
let _: Result<Vec<script::Instruction>, script::Error> =
15+
script_buf.instructions().collect();
1616

1717
let _ = script_buf.to_string();
1818
let _ = script_buf.count_sigops();

fuzz/fuzz_targets/bitcoin/arbitrary_transaction.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use arbitrary::{Arbitrary, Unstructured};
2-
use honggfuzz::fuzz;
32
use bitcoin::consensus::{deserialize, serialize};
4-
use bitcoin::Transaction;
53
use bitcoin::transaction::TransactionExt as _;
4+
use bitcoin::Transaction;
5+
use honggfuzz::fuzz;
66

77
fn do_test(data: &[u8]) {
88
let mut u = Unstructured::new(data);

fuzz/fuzz_targets/bitcoin/deserialize_block.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use honggfuzz::fuzz;
22

33
fn do_test(data: &[u8]) {
4-
let block_result: Result<bitcoin::Block, _> =
5-
bitcoin::consensus::encode::deserialize(data);
4+
let block_result: Result<bitcoin::Block, _> = bitcoin::consensus::encode::deserialize(data);
65

76
match block_result {
87
Err(_) => {}

fuzz/fuzz_targets/bitcoin/deserialize_transaction.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use honggfuzz::fuzz;
22

33
fn do_test(data: &[u8]) {
4-
let tx_result: Result<bitcoin::Transaction, _> =
5-
bitcoin::consensus::encode::deserialize(data);
4+
let tx_result: Result<bitcoin::Transaction, _> = bitcoin::consensus::encode::deserialize(data);
65

76
match tx_result {
87
Err(_) => {}

fuzz/fuzz_targets/bitcoin/deserialize_witness.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ use bitcoin::witness::Witness;
22
use honggfuzz::fuzz;
33

44
fn do_test(data: &[u8]) {
5-
let witness_result: Result<Witness, _> =
6-
bitcoin::consensus::encode::deserialize(data);
5+
let witness_result: Result<Witness, _> = bitcoin::consensus::encode::deserialize(data);
76

87
match witness_result {
98
Err(_) => {}

units/src/amount/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ pub use self::{
3737
signed::SignedAmount,
3838
unsigned::Amount,
3939
};
40-
#[doc(inline)]
41-
#[cfg(feature = "encoding")]
42-
pub use self::unsigned::AmountDecoder;
4340
#[cfg(feature = "encoding")]
4441
#[doc(no_inline)]
4542
pub use self::error::AmountDecoderError;
4643
#[doc(no_inline)]
4744
pub use self::error::{OutOfRangeError, ParseAmountError, ParseDenominationError, ParseError};
45+
#[doc(inline)]
46+
#[cfg(feature = "encoding")]
47+
pub use self::unsigned::AmountDecoder;
4848

4949
/// A set of denominations in which amounts can be expressed.
5050
///

0 commit comments

Comments
 (0)