]> Untitled Git - bdk/commitdiff
ci(clippy): fix new stricter needless_lifetime errors for rust 1.83
authorSteve Myers <steve@notmandatory.org>
Mon, 6 Jan 2025 16:19:41 +0000 (10:19 -0600)
committerSteve Myers <steve@notmandatory.org>
Mon, 6 Jan 2025 16:19:41 +0000 (10:19 -0600)
https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
rust-lang/rust-clippy#13286

examples/policy.rs
src/descriptor/mod.rs
src/wallet/tx_builder.rs

index 64e17825b72620338ab64798d48c1e625e7e00da..1dcd389872bb14a1e220a90637cedabc78ffb4d7 100644 (file)
@@ -27,7 +27,6 @@ use bdk::wallet::signer::SignersContainer;
 ///
 /// This example demos a Policy output for a 2of2 multisig between between 2 parties, where the wallet holds
 /// one of the Extend Private key.
-
 fn main() -> Result<(), Box<dyn Error>> {
     env_logger::init_from_env(
         env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"),
index dfb7bcc5f4e00c68483758ec94ec41e2e66118d6..17c5800dcecb62308dcd2859416fce487161d456 100644 (file)
@@ -134,9 +134,7 @@ impl IntoWalletDescriptor for (ExtendedDescriptor, KeyMap) {
             network: Network,
         }
 
-        impl<'s, 'd> miniscript::Translator<DescriptorPublicKey, String, DescriptorError>
-            for Translator<'s, 'd>
-        {
+        impl miniscript::Translator<DescriptorPublicKey, String, DescriptorError> for Translator<'_, '_> {
             fn pk(&mut self, pk: &DescriptorPublicKey) -> Result<String, DescriptorError> {
                 let secp = &self.secp;
 
index 9ce101217844ca1fd5c27c87070c00d1f8457d80..cdbcee0a4457e569c7692c62f387d51f4a0988fa 100644 (file)
@@ -167,7 +167,7 @@ impl std::default::Default for FeePolicy {
     }
 }
 
-impl<'a, Cs: Clone, Ctx, D> Clone for TxBuilder<'a, D, Cs, Ctx> {
+impl<Cs: Clone, Ctx, D> Clone for TxBuilder<'_, D, Cs, Ctx> {
     fn clone(&self) -> Self {
         TxBuilder {
             wallet: self.wallet,
@@ -584,7 +584,7 @@ impl<'a, D: BatchDatabase, Cs: CoinSelectionAlgorithm<D>, Ctx: TxBuilderContext>
     }
 }
 
-impl<'a, D: BatchDatabase, Cs: CoinSelectionAlgorithm<D>> TxBuilder<'a, D, Cs, CreateTx> {
+impl<D: BatchDatabase, Cs: CoinSelectionAlgorithm<D>> TxBuilder<'_, D, Cs, CreateTx> {
     /// Replace the recipients already added with a new list
     pub fn set_recipients(&mut self, recipients: Vec<(ScriptBuf, u64)>) -> &mut Self {
         self.params.recipients = recipients;
@@ -658,7 +658,7 @@ impl<'a, D: BatchDatabase, Cs: CoinSelectionAlgorithm<D>> TxBuilder<'a, D, Cs, C
 }
 
 // methods supported only by bump_fee
-impl<'a, D: BatchDatabase> TxBuilder<'a, D, DefaultCoinSelectionAlgorithm, BumpFee> {
+impl<D: BatchDatabase> TxBuilder<'_, D, DefaultCoinSelectionAlgorithm, BumpFee> {
     /// Explicitly tells the wallet that it is allowed to reduce the amount of the output matching this
     /// `script_pubkey` in order to bump the transaction fee. Without specifying this the wallet
     /// will attempt to find a change output to shrink instead.