Skip to content

Commit ac8e9f0

Browse files
committed
Run the formatter
Formatting change only, kept seperate to make diff or previous patch easier to read.
1 parent 4ede644 commit ac8e9f0

File tree

19 files changed

+118
-59
lines changed

19 files changed

+118
-59
lines changed

types/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ impl fmt::Display for ScriptPubkeyError {
223223
match *self {
224224
Self::Hex(ref e) => write_err!(f, "conversion of the `hex` field failed"; e),
225225
Self::Address(ref e) => write_err!(f, "conversion of the `address` field failed"; e),
226-
Self::Addresses(ref e) => write_err!(f, "conversion of the `addresses` field failed"; e),
226+
Self::Addresses(ref e) =>
227+
write_err!(f, "conversion of the `addresses` field failed"; e),
227228
}
228229
}
229230
}

types/src/psbt/error.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ impl fmt::Display for PartialSignatureError {
143143
match *self {
144144
Self::PublicKey(ref e) =>
145145
write_err!(f, "partial sigs key-value pair parse pubkey failed"; e),
146-
Self::Signature(ref e) => write_err!(f, "partial sigs key-value pair parse sig failed"; e),
146+
Self::Signature(ref e) =>
147+
write_err!(f, "partial sigs key-value pair parse sig failed"; e),
147148
}
148149
}
149150
}

types/src/v17/blockchain/error.rs

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ impl fmt::Display for GetBlockVerboseOneError {
3636
Self::Hash(ref e) => write_err!(f, "conversion of the `hash` field failed"; e),
3737
Self::Tx(ref e) => write_err!(f, "conversion of the `tx` field failed"; e),
3838
Self::Bits(ref e) => write_err!(f, "conversion of the `bits` field failed"; e),
39-
Self::ChainWork(ref e) => write_err!(f, "conversion of the `chain_work` field failed"; e),
39+
Self::ChainWork(ref e) =>
40+
write_err!(f, "conversion of the `chain_work` field failed"; e),
4041
Self::PreviousBlockHash(ref e) =>
4142
write_err!(f, "conversion of the `previous_block_hash` field failed"; e),
4243
Self::NextBlockHash(ref e) =>
@@ -84,7 +85,8 @@ impl fmt::Display for GetBlockchainInfoError {
8485
Self::Chain(ref e) => write_err!(f, "conversion of the `chain` field failed"; e),
8586
Self::BestBlockHash(ref e) =>
8687
write_err!(f, "conversion of the `best_block_hash` field failed"; e),
87-
Self::ChainWork(ref e) => write_err!(f, "conversion of the `chain_work` field failed"; e),
88+
Self::ChainWork(ref e) =>
89+
write_err!(f, "conversion of the `chain_work` field failed"; e),
8890
}
8991
}
9092
}
@@ -118,7 +120,8 @@ impl fmt::Display for GetBlockHeaderError {
118120
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
119121
match *self {
120122
Self::Hex(ref e) => write_err!(f, "conversion of hex data to bytes failed"; e),
121-
Self::Consensus(ref e) => write_err!(f, "consensus decoding of bytes to header failed"; e),
123+
Self::Consensus(ref e) =>
124+
write_err!(f, "consensus decoding of bytes to header failed"; e),
122125
}
123126
}
124127
}
@@ -157,9 +160,11 @@ impl fmt::Display for GetBlockHeaderVerboseError {
157160
match *self {
158161
Self::Numeric(ref e) => write_err!(f, "numeric"; e),
159162
Self::Hash(ref e) => write_err!(f, "conversion of the `hash` field failed"; e),
160-
Self::MerkleRoot(ref e) => write_err!(f, "conversion of the `merkle_root` field failed"; e),
163+
Self::MerkleRoot(ref e) =>
164+
write_err!(f, "conversion of the `merkle_root` field failed"; e),
161165
Self::Bits(ref e) => write_err!(f, "conversion of the `bits` field failed"; e),
162-
Self::ChainWork(ref e) => write_err!(f, "conversion of the `chain_work` field failed"; e),
166+
Self::ChainWork(ref e) =>
167+
write_err!(f, "conversion of the `chain_work` field failed"; e),
163168
Self::PreviousBlockHash(ref e) =>
164169
write_err!(f, "conversion of the `previous_block_hash` field failed"; e),
165170
Self::NextBlockHash(ref e) =>
@@ -200,7 +205,8 @@ impl fmt::Display for GetBlockStatsError {
200205
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
201206
match *self {
202207
Self::Numeric(ref e) => write_err!(f, "numeric"; e),
203-
Self::BlockHash(ref e) => write_err!(f, "conversion of the `block_hash` field failed"; e),
208+
Self::BlockHash(ref e) =>
209+
write_err!(f, "conversion of the `block_hash` field failed"; e),
204210
}
205211
}
206212
}
@@ -375,7 +381,8 @@ impl fmt::Display for MempoolEntryFeesError {
375381
Self::Base(ref e) => write_err!(f, "conversion of the `base` field failed"; e),
376382
Self::Modified(ref e) => write_err!(f, "conversion of the `modified` field failed"; e),
377383
Self::Ancestor(ref e) => write_err!(f, "conversion of the `ancestor` field failed"; e),
378-
Self::Descendant(ref e) => write_err!(f, "conversion of the `descendant` field failed"; e),
384+
Self::Descendant(ref e) =>
385+
write_err!(f, "conversion of the `descendant` field failed"; e),
379386
}
380387
}
381388
}
@@ -450,7 +457,8 @@ impl fmt::Display for GetTxOutError {
450457
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
451458
match *self {
452459
Self::Numeric(ref e) => write_err!(f, "numeric"; e),
453-
Self::BestBlock(ref e) => write_err!(f, "conversion of the `beast_block` field failed"; e),
460+
Self::BestBlock(ref e) =>
461+
write_err!(f, "conversion of the `beast_block` field failed"; e),
454462
Self::Value(ref e) => write_err!(f, "conversion of the `value` field failed"; e),
455463
Self::ScriptBuf(ref e) =>
456464
write_err!(f, "conversion of the `ScriptPubkey` hex to a `ScriptBuf` failed"; e),
@@ -492,8 +500,10 @@ impl fmt::Display for GetTxOutSetInfoError {
492500
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
493501
match *self {
494502
Self::Numeric(ref e) => write_err!(f, "numeric"; e),
495-
Self::BestBlock(ref e) => write_err!(f, "conversion of the `best_block` field failed"; e),
496-
Self::TotalAmount(ref e) => write_err!(f, "conversion of the `total_amount` field failed"; e),
503+
Self::BestBlock(ref e) =>
504+
write_err!(f, "conversion of the `best_block` field failed"; e),
505+
Self::TotalAmount(ref e) =>
506+
write_err!(f, "conversion of the `total_amount` field failed"; e),
497507
}
498508
}
499509
}

types/src/v17/raw_transactions/error.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ impl fmt::Display for DecodePsbtError {
3333
Self::Unknown(ref e) =>
3434
write_err!(f, "conversion of one the map items in the `unknown` field failed"; e),
3535
Self::Inputs(ref e) => write_err!(f, "conversion of one of the PSBT inputs failed"; e),
36-
Self::Outputs(ref e) => write_err!(f, "conversion of one of the PSBT outputs failed"; e),
36+
Self::Outputs(ref e) =>
37+
write_err!(f, "conversion of one of the PSBT outputs failed"; e),
3738
}
3839
}
3940
}
@@ -172,7 +173,8 @@ impl fmt::Display for DecodeScriptError {
172173
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
173174
match *self {
174175
Self::Hex(ref e) => write_err!(f, "conversion of the `hex` field failed"; e),
175-
Self::Addresses(ref e) => write_err!(f, "conversion of the `addresses` field failed"; e),
176+
Self::Addresses(ref e) =>
177+
write_err!(f, "conversion of the `addresses` field failed"; e),
176178
Self::P2sh(ref e) => write_err!(f, "conversion of the `p2sh` field failed"; e),
177179
}
178180
}
@@ -263,7 +265,8 @@ impl fmt::Display for GetRawTransactionVerboseError {
263265
write_err!(f, "conversion of one of the transaction inputs failed"; e),
264266
Self::Outputs(ref e) =>
265267
write_err!(f, "conversion of one of the transaction outputs failed"; e),
266-
Self::BlockHash(ref e) => write_err!(f, "conversion of the `block_hash` field failed"; e),
268+
Self::BlockHash(ref e) =>
269+
write_err!(f, "conversion of the `block_hash` field failed"; e),
267270
}
268271
}
269272
}
@@ -320,7 +323,8 @@ impl fmt::Display for SignFailError {
320323
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
321324
match *self {
322325
Self::Txid(ref e) => write_err!(f, "conversion of the `txid` field failed"; e),
323-
Self::ScriptSig(ref e) => write_err!(f, "conversion of the `script_sig` field failed"; e),
326+
Self::ScriptSig(ref e) =>
327+
write_err!(f, "conversion of the `script_sig` field failed"; e),
324328
}
325329
}
326330
}

types/src/v17/wallet/error.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,10 @@ impl fmt::Display for GetAddressInfoError {
121121
Self::Pubkeys(ref e) => write_err!(f, "conversion of the `pubkeys` field failed"; e),
122122
Self::Pubkey(ref e) => write_err!(f, "conversion of the `pubkey` failed"; e),
123123
Self::Embedded(ref e) => write_err!(f, "conversion of the `embedded` field failed"; e),
124-
Self::HdKeyPath(ref e) => write_err!(f, "conversion of the `hd_key_path` field failed"; e),
125-
Self::HdSeedId(ref e) => write_err!(f, "conversion of the `hd_seed_id` field failed"; e),
124+
Self::HdKeyPath(ref e) =>
125+
write_err!(f, "conversion of the `hd_key_path` field failed"; e),
126+
Self::HdSeedId(ref e) =>
127+
write_err!(f, "conversion of the `hd_seed_id` field failed"; e),
126128
}
127129
}
128130
}
@@ -247,7 +249,8 @@ impl fmt::Display for GetTransactionError {
247249
Self::Numeric(ref e) => write_err!(f, "numeric"; e),
248250
Self::Amount(ref e) => write_err!(f, "conversion of the `amount` field failed"; e),
249251
Self::Fee(ref e) => write_err!(f, "conversion of the `fee` field failed"; e),
250-
Self::BlockHash(ref e) => write_err!(f, "conversion of the `block_hash` field failed"; e),
252+
Self::BlockHash(ref e) =>
253+
write_err!(f, "conversion of the `block_hash` field failed"; e),
251254
Self::Txid(ref e) => write_err!(f, "conversion of the `txid` field failed"; e),
252255
Self::WalletConflicts(ref e) =>
253256
write_err!(f, "conversion of the `wallet_conflicts` field failed"; e),
@@ -335,8 +338,10 @@ impl fmt::Display for GetWalletInfoError {
335338
write_err!(f, "conversion of the `unconfirmed_balance` field failed"; e),
336339
Self::ImmatureBalance(ref e) =>
337340
write_err!(f, "conversion of the `immature_balance` field failed"; e),
338-
Self::PayTxFee(ref e) => write_err!(f, "conversion of the `pay_tx_fee` field failed"; e),
339-
Self::HdSeedId(ref e) => write_err!(f, "conversion of the `hd_seed_id` field failed"; e),
341+
Self::PayTxFee(ref e) =>
342+
write_err!(f, "conversion of the `pay_tx_fee` field failed"; e),
343+
Self::HdSeedId(ref e) =>
344+
write_err!(f, "conversion of the `hd_seed_id` field failed"; e),
340345
}
341346
}
342347
}
@@ -469,7 +474,8 @@ impl fmt::Display for ListSinceBlockError {
469474
Self::Transactions(ref e) =>
470475
write_err!(f, "conversion of the `transactions` field failed"; e),
471476
Self::Removed(ref e) => write_err!(f, "conversion of the `removed` field failed"; e),
472-
Self::LastBlock(ref e) => write_err!(f, "conversion of the `last_block` field failed"; e),
477+
Self::LastBlock(ref e) =>
478+
write_err!(f, "conversion of the `last_block` field failed"; e),
473479
}
474480
}
475481
}
@@ -509,7 +515,8 @@ impl fmt::Display for TransactionItemError {
509515
Self::Address(ref e) => write_err!(f, "conversion of the `address` field failed"; e),
510516
Self::Amount(ref e) => write_err!(f, "conversion of the `amount` field failed"; e),
511517
Self::Fee(ref e) => write_err!(f, "conversion of the `fee` field failed"; e),
512-
Self::BlockHash(ref e) => write_err!(f, "conversion of the `block_hash` field failed"; e),
518+
Self::BlockHash(ref e) =>
519+
write_err!(f, "conversion of the `block_hash` field failed"; e),
513520
Self::Txid(ref e) => write_err!(f, "conversion of the `txid` field failed"; e),
514521
}
515522
}

types/src/v18/raw_transactions/error.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ impl fmt::Display for AnalyzePsbtInputMissingError {
5757
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5858
match *self {
5959
Self::Pubkeys(ref e) => write_err!(f, "conversion of the `pubkeys` field failed"; e),
60-
Self::Signatures(ref e) => write_err!(f, "conversion of the `signatures` field failed"; e),
60+
Self::Signatures(ref e) =>
61+
write_err!(f, "conversion of the `signatures` field failed"; e),
6162
Self::RedeemScript(ref e) =>
6263
write_err!(f, "conversion of the `redeem_script` field failed"; e),
6364
Self::WitnessScript(ref e) =>

types/src/v18/wallet/error.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ impl fmt::Display for GetAddressInfoError {
6060
Self::Pubkeys(ref e) => write_err!(f, "conversion of the `pubkeys` field failed"; e),
6161
Self::Pubkey(ref e) => write_err!(f, "conversion of the `pubkey` failed"; e),
6262
Self::Embedded(ref e) => write_err!(f, "conversion of the `embedded` field failed"; e),
63-
Self::HdKeyPath(ref e) => write_err!(f, "conversion of the `hd_key_path` field failed"; e),
64-
Self::HdSeedId(ref e) => write_err!(f, "conversion of the `hd_seed_id` field failed"; e),
63+
Self::HdKeyPath(ref e) =>
64+
write_err!(f, "conversion of the `hd_key_path` field failed"; e),
65+
Self::HdSeedId(ref e) =>
66+
write_err!(f, "conversion of the `hd_seed_id` field failed"; e),
6567
Self::HdMasterFingerprint(ref e) =>
6668
write_err!(f, "conversion of the `hd_master_fingerprint` field failed"; e),
6769
}

types/src/v19/blockchain/error.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ impl fmt::Display for GetBlockchainInfoError {
3030
Self::BestBlockHash(ref e) => {
3131
write_err!(f, "conversion of the `best_block_hash` field failed"; e)
3232
}
33-
Self::ChainWork(ref e) => write_err!(f, "conversion of the `chain_work` field failed"; e),
33+
Self::ChainWork(ref e) =>
34+
write_err!(f, "conversion of the `chain_work` field failed"; e),
3435
}
3536
}
3637
}
@@ -169,8 +170,10 @@ impl fmt::Display for MempoolEntryFeesError {
169170
match *self {
170171
Self::Base(ref e) => write_err!(f, "conversion of the `base` field failed"; e),
171172
Self::Modified(ref e) => write_err!(f, "conversion of the `modified` field failed"; e),
172-
Self::MempoolEntry(ref e) => write_err!(f, "conversion of the `ancestor` field failed"; e),
173-
Self::Descendant(ref e) => write_err!(f, "conversion of the `descendant` field failed"; e),
173+
Self::MempoolEntry(ref e) =>
174+
write_err!(f, "conversion of the `ancestor` field failed"; e),
175+
Self::Descendant(ref e) =>
176+
write_err!(f, "conversion of the `descendant` field failed"; e),
174177
}
175178
}
176179
}

types/src/v19/wallet/error.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ impl fmt::Display for GetBalancesError {
1919
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2020
match *self {
2121
Self::Mine(ref e) => write_err!(f, "conversion of the `mine` field failed"; e),
22-
Self::WatchOnly(ref e) => write_err!(f, "conversion of the `watchonly` field failed"; e),
22+
Self::WatchOnly(ref e) =>
23+
write_err!(f, "conversion of the `watchonly` field failed"; e),
2324
}
2425
}
2526
}

types/src/v20/wallet/error.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ impl fmt::Display for ListSinceBlockError {
2727
Self::Transactions(ref e) =>
2828
write_err!(f, "conversion of the `transactions` field failed"; e),
2929
Self::Removed(ref e) => write_err!(f, "conversion of the `removed` field failed"; e),
30-
Self::LastBlock(ref e) => write_err!(f, "conversion of the `last_block` field failed"; e),
30+
Self::LastBlock(ref e) =>
31+
write_err!(f, "conversion of the `last_block` field failed"; e),
3132
}
3233
}
3334
}
@@ -73,7 +74,8 @@ impl fmt::Display for TransactionItemError {
7374
Self::Address(ref e) => write_err!(f, "conversion of the `address` field failed"; e),
7475
Self::Amount(ref e) => write_err!(f, "conversion of the `amount` field failed"; e),
7576
Self::Fee(ref e) => write_err!(f, "conversion of the `fee` field failed"; e),
76-
Self::BlockHash(ref e) => write_err!(f, "conversion of the `block_hash` field failed"; e),
77+
Self::BlockHash(ref e) =>
78+
write_err!(f, "conversion of the `block_hash` field failed"; e),
7779
Self::Txid(ref e) => write_err!(f, "conversion of the `txid` field failed"; e),
7880
Self::WalletConflicts(ref e) =>
7981
write_err!(f, "conversion of an item in the `wallet_conflicts` list failed"; e),

0 commit comments

Comments
 (0)