Skip to content

Commit ee6637b

Browse files
committed
Merge #2043: fix(example_cli): clippy warnings
62da6dc fix(electrum): clippy warnings (Leonardo Lima) cb6ef76 fix(example_cli): clippy warnings (Leonardo Lima) Pull request description: ### Description There's some annoying clippy warnings/errors that I'm only facing on the CI and not able to reproduce locally. I'm fixing those here. ### Changelog notice ``` ### Changed - Update the string formatting in `example_cli`. ``` ### Checklists #### All Submissions: * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) ACKs for top commit: evanlinjin: ACK 62da6dc Tree-SHA512: 273e09bbfd841cbbcc0f57e24ae40dd0bcb68523fec684d9e380629ac6b0aab198214f8208fb48e88cfa391b3c6a427d757492da465495301cdfb44d28f6ab8c
2 parents faf520d + 62da6dc commit ee6637b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/electrum/tests/test_electrum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ where
7171
if let Some(chain_update) = update.chain_update.clone() {
7272
let _ = chain
7373
.apply_update(chain_update)
74-
.map_err(|err| anyhow::anyhow!("LocalChain update error: {:?}", err))?;
74+
.map_err(|err| anyhow::anyhow!("LocalChain update error: {err:?}"))?;
7575
}
7676
let _ = graph.apply_update(update.tx_update.clone());
7777

examples/example_cli/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ impl FromStr for CoinSelectionAlgo {
229229
"oldest-first" => OldestFirst,
230230
"newest-first" => NewestFirst,
231231
"bnb" => BranchAndBound,
232-
unknown => bail!("unknown coin selection algorithm '{}'", unknown),
232+
unknown => bail!("unknown coin selection algorithm '{unknown}'"),
233233
})
234234
}
235235
}
@@ -715,8 +715,8 @@ pub fn handle_commands<CS: clap::Subcommand, S: clap::Args>(
715715
_ => unimplemented!("multi xkey signer"),
716716
};
717717

718-
let _ = sign_res
719-
.map_err(|errors| anyhow::anyhow!("failed to sign PSBT {:?}", errors))?;
718+
let _ =
719+
sign_res.map_err(|errors| anyhow::anyhow!("failed to sign PSBT {errors:?}"))?;
720720

721721
let mut obj = serde_json::Map::new();
722722
obj.insert("psbt".to_string(), json!(psbt.to_string()));

0 commit comments

Comments
 (0)