Skip to content

Commit 78fb920

Browse files
committed
Format code
Format code
1 parent 371d4ec commit 78fb920

File tree

10 files changed

+25
-46
lines changed

10 files changed

+25
-46
lines changed

client/src/client_sync/v17/blockchain.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,10 @@ macro_rules! impl_client_v17__scan_tx_out_set {
329329
}
330330

331331
/// Starts a scan of the UTXO set for specified descriptors.
332-
pub fn scan_tx_out_set_start(&self, scan_objects: &[&str]) -> Result<ScanTxOutSetStart> {
332+
pub fn scan_tx_out_set_start(
333+
&self,
334+
scan_objects: &[&str],
335+
) -> Result<ScanTxOutSetStart> {
333336
self.call("scantxoutset", &[into_json("start")?, into_json(scan_objects)?])
334337
}
335338

client/src/client_sync/v28/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ crate::impl_client_v17__scan_tx_out_set!();
6363
crate::impl_client_v17__verify_chain!();
6464
crate::impl_client_v17__verify_tx_out_proof!();
6565

66-
6766
// == Control ==
6867
crate::impl_client_v17__get_memory_info!();
6968
crate::impl_client_v18__get_rpc_info!();

types/src/v17/blockchain/error.rs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -548,20 +548,13 @@ impl fmt::Display for ScanTxOutSetError {
548548
use ScanTxOutSetError::*;
549549

550550
match self {
551-
BestBlockHash(e) =>
552-
write_err!(f, "conversion of the `bestblock` field failed"; e),
553-
BlockHash(e) =>
554-
write_err!(f, "conversion of the `blockhash` field failed"; e),
555-
Txid(e) =>
556-
write_err!(f, "conversion of the `txid` field failed"; e),
557-
ScriptPubKey(e) =>
558-
write_err!(f, "conversion of the `scriptPubKey` field failed"; e),
559-
TotalAmount(e) =>
560-
write_err!(f, "conversion of the `total_amount` field failed"; e),
561-
Amount(e) =>
562-
write_err!(f, "conversion of the `amount` field failed"; e),
563-
Numeric(e) =>
564-
write_err!(f, "numeric"; e),
551+
BestBlockHash(e) => write_err!(f, "conversion of the `bestblock` field failed"; e),
552+
BlockHash(e) => write_err!(f, "conversion of the `blockhash` field failed"; e),
553+
Txid(e) => write_err!(f, "conversion of the `txid` field failed"; e),
554+
ScriptPubKey(e) => write_err!(f, "conversion of the `scriptPubKey` field failed"; e),
555+
TotalAmount(e) => write_err!(f, "conversion of the `total_amount` field failed"; e),
556+
Amount(e) => write_err!(f, "conversion of the `amount` field failed"; e),
557+
Numeric(e) => write_err!(f, "numeric"; e),
565558
}
566559
}
567560
}

types/src/v17/blockchain/into.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: CC0-1.0
22

33
use bitcoin::consensus::encode;
4-
use bitcoin::{block, hex, Block, BlockHash, CompactTarget, Txid, Weight, Work, ScriptBuf};
4+
use bitcoin::{block, hex, Block, BlockHash, CompactTarget, ScriptBuf, Txid, Weight, Work};
55

66
// TODO: Use explicit imports?
77
use super::*;
@@ -556,11 +556,8 @@ impl ScanTxOutSetStart {
556556
pub fn into_model(self) -> Result<model::ScanTxOutSetStart, ScanTxOutSetError> {
557557
use ScanTxOutSetError as E;
558558

559-
let unspents = self
560-
.unspents
561-
.into_iter()
562-
.map(|u| u.into_model())
563-
.collect::<Result<Vec<_>, _>>()?;
559+
let unspents =
560+
self.unspents.into_iter().map(|u| u.into_model()).collect::<Result<Vec<_>, _>>()?;
564561

565562
let total_amount = Amount::from_btc(self.total_amount).map_err(E::TotalAmount)?;
566563

types/src/v17/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ pub use self::{
244244
GetMempoolDescendantsVerbose, GetMempoolEntry, GetMempoolInfo, GetMempoolInfoError,
245245
GetRawMempool, GetRawMempoolVerbose, GetTxOut, GetTxOutError, GetTxOutSetInfo,
246246
GetTxOutSetInfoError, MapMempoolEntryError, MempoolEntry, MempoolEntryError,
247-
MempoolEntryFees, MempoolEntryFeesError, PruneBlockchain, ScanTxOutSetAbort, ScanTxOutSetError,
248-
ScanTxOutSetStart, ScanTxOutSetStatus, ScanTxOutSetUnspent, Softfork, SoftforkReject,
249-
VerifyChain, VerifyTxOutProof,
247+
MempoolEntryFees, MempoolEntryFeesError, PruneBlockchain, ScanTxOutSetAbort,
248+
ScanTxOutSetError, ScanTxOutSetStart, ScanTxOutSetStatus, ScanTxOutSetUnspent, Softfork,
249+
SoftforkReject, VerifyChain, VerifyTxOutProof,
250250
},
251251
control::{GetMemoryInfoStats, Locked, Logging},
252252
generating::{Generate, GenerateToAddress},

types/src/v18/blockchain/into.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,8 @@ impl ScanTxOutSetStart {
142142
pub fn into_model(self) -> Result<model::ScanTxOutSetStart, ScanTxOutSetError> {
143143
use ScanTxOutSetError as E;
144144

145-
let unspents = self
146-
.unspents
147-
.into_iter()
148-
.map(|u| u.into_model())
149-
.collect::<Result<Vec<_>, _>>()?;
145+
let unspents =
146+
self.unspents.into_iter().map(|u| u.into_model()).collect::<Result<Vec<_>, _>>()?;
150147

151148
let total_amount = Amount::from_btc(self.total_amount).map_err(E::TotalAmount)?;
152149

types/src/v19/blockchain/into.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,8 @@ impl ScanTxOutSetStart {
270270

271271
let bestblock = self.best_block.parse::<BlockHash>().map_err(E::BestBlockHash)?;
272272

273-
let unspents = self
274-
.unspents
275-
.into_iter()
276-
.map(|u| u.into_model())
277-
.collect::<Result<Vec<_>, _>>()?;
273+
let unspents =
274+
self.unspents.into_iter().map(|u| u.into_model()).collect::<Result<Vec<_>, _>>()?;
278275

279276
let total_amount = Amount::from_btc(self.total_amount).map_err(E::TotalAmount)?;
280277

types/src/v25/blockchain/into.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,8 @@ impl ScanTxOutSetStart {
8787

8888
let bestblock = self.best_block.parse::<BlockHash>().map_err(E::BestBlockHash)?;
8989

90-
let unspents = self
91-
.unspents
92-
.into_iter()
93-
.map(|u| u.into_model())
94-
.collect::<Result<Vec<_>, _>>()?;
90+
let unspents =
91+
self.unspents.into_iter().map(|u| u.into_model()).collect::<Result<Vec<_>, _>>()?;
9592

9693
let total_amount = Amount::from_btc(self.total_amount).map_err(E::TotalAmount)?;
9794

types/src/v28/blockchain/into.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
use bitcoin::{Amount, BlockHash, ScriptBuf, Txid};
44

5-
use super::{
6-
ScanTxOutSetError, ScanTxOutSetStart, ScanTxOutSetUnspent,
7-
};
5+
use super::{ScanTxOutSetError, ScanTxOutSetStart, ScanTxOutSetUnspent};
86
use crate::model;
97

108
impl ScanTxOutSetStart {

types/src/v28/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,7 @@ mod wallet;
259259

260260
#[doc(inline)]
261261
pub use self::{
262-
blockchain::{
263-
GetBlockchainInfo, ScanTxOutSetStart, ScanTxOutSetUnspent,
264-
},
262+
blockchain::{GetBlockchainInfo, ScanTxOutSetStart, ScanTxOutSetUnspent},
265263
control::Logging,
266264
mining::GetMiningInfo,
267265
network::GetNetworkInfo,

0 commit comments

Comments
 (0)