Skip to content

Commit 1fabfe0

Browse files
committed
chore: Make clippy happy
1 parent a1ddd5b commit 1fabfe0

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

examples/synopsis.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn main() -> anyhow::Result<()> {
3131
let txid = env.send(&addr, Amount::ONE_BTC)?;
3232
env.mine_blocks(1, None)?;
3333
wallet.sync(&env)?;
34-
println!("Received {}", txid);
34+
println!("Received {txid}");
3535
println!("Balance (confirmed): {}", wallet.balance());
3636

3737
let txid = env.send(&addr, Amount::ONE_BTC)?;
@@ -88,14 +88,14 @@ fn main() -> anyhow::Result<()> {
8888

8989
// We will try bump this tx fee.
9090
let txid = env.rpc_client().send_raw_transaction(&tx)?;
91-
println!("tx broadcasted: {}", txid);
91+
println!("tx broadcasted: {txid}");
9292
wallet.sync(&env)?;
9393
println!("Balance (send tx): {}", wallet.balance());
9494

9595
// Try cancel a tx.
9696
// We follow all the rules as specified by
9797
// https://github.com/bitcoin/bitcoin/blob/master/doc/policy/mempool-replacements.md#current-replace-by-fee-policy
98-
println!("OKAY LET's TRY CANCEL {}", txid);
98+
println!("OKAY LET's TRY CANCEL {txid}");
9999
{
100100
let original_tx = wallet
101101
.graph
@@ -172,7 +172,7 @@ fn main() -> anyhow::Result<()> {
172172
((fee.to_sat() as f32) / (tx.weight().to_vbytes_ceil() as f32)),
173173
);
174174
let txid = env.rpc_client().send_raw_transaction(&tx)?;
175-
println!("tx broadcasted: {}", txid);
175+
println!("tx broadcasted: {txid}");
176176
wallet.sync(&env)?;
177177
println!("Balance (RBF): {}", wallet.balance());
178178
}

src/canonical_unspents.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ pub enum GetForeignUnspentError {
242242
impl fmt::Display for GetForeignUnspentError {
243243
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
244244
match self {
245-
Self::Coinbase(err) => write!(f, "{}", err),
246-
Self::FromPsbtInput(err) => write!(f, "{}", err),
245+
Self::Coinbase(err) => write!(f, "{err}"),
246+
Self::FromPsbtInput(err) => write!(f, "{err}"),
247247
Self::OutputIsAlreadySpent(op) => {
248-
write!(f, "outpoint is already spent: {}", op)
248+
write!(f, "outpoint is already spent: {op}")
249249
}
250-
Self::UtxoMismatch(op) => write!(f, "UTXO mismatch: {}", op),
250+
Self::UtxoMismatch(op) => write!(f, "UTXO mismatch: {op}"),
251251
}
252252
}
253253
}
@@ -269,9 +269,9 @@ pub enum ExtractReplacementsError {
269269
impl fmt::Display for ExtractReplacementsError {
270270
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
271271
match self {
272-
Self::TransactionNotFound(txid) => write!(f, "transaction not found: {}", txid),
272+
Self::TransactionNotFound(txid) => write!(f, "transaction not found: {txid}"),
273273
Self::CannotReplaceCoinbase => write!(f, "cannot replace a coinbase transaction"),
274-
Self::PreviousOutputNotFound(op) => write!(f, "previous output not found: {}", op),
274+
Self::PreviousOutputNotFound(op) => write!(f, "previous output not found: {op}"),
275275
}
276276
}
277277
}

src/input.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ pub enum FromPsbtInputError {
167167
impl fmt::Display for FromPsbtInputError {
168168
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
169169
match self {
170-
Self::Coinbase(err) => write!(f, "{}", err),
170+
Self::Coinbase(err) => write!(f, "{err}"),
171171
Self::InvalidOutPoint(op) => {
172-
write!(f, "invalid outpoint: {}", op)
172+
write!(f, "invalid outpoint: {op}")
173173
}
174174
Self::UtxoCheck => {
175175
write!(

src/input_candidates.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,12 @@ impl<E: fmt::Display> fmt::Display for IntoSelectionError<E> {
228228
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
229229
match self {
230230
IntoSelectionError::Selector(error) => {
231-
write!(f, "{}", error)
231+
write!(f, "{error}")
232232
}
233233
IntoSelectionError::SelectionAlgorithm(error) => {
234-
write!(f, "selection algorithm failed: {}", error)
234+
write!(f, "selection algorithm failed: {error}")
235235
}
236-
IntoSelectionError::CannotMeetTarget(error) => write!(f, "{}", error),
236+
IntoSelectionError::CannotMeetTarget(error) => write!(f, "{error}"),
237237
}
238238
}
239239
}
@@ -275,9 +275,9 @@ pub enum PolicyFailure<PF> {
275275
impl<PF: fmt::Display> fmt::Display for PolicyFailure<PF> {
276276
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
277277
match self {
278-
PolicyFailure::MissingOutputs(err) => write!(f, "{}", err),
278+
PolicyFailure::MissingOutputs(err) => write!(f, "{err}"),
279279
PolicyFailure::PolicyFailure(err) => {
280-
write!(f, "policy failure: {}", err)
280+
write!(f, "policy failure: {err}")
281281
}
282282
}
283283
}

src/selector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ pub enum SelectorError {
243243
impl fmt::Display for SelectorError {
244244
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
245245
match self {
246-
Self::Miniscript(err) => write!(f, "{}", err),
247-
Self::CannotMeetTarget(err) => write!(f, "{}", err),
246+
Self::Miniscript(err) => write!(f, "{err}"),
247+
Self::CannotMeetTarget(err) => write!(f, "{err}"),
248248
}
249249
}
250250
}

0 commit comments

Comments
 (0)