From 24ec31bf66ec3a3788f96e8941c203a1e198af81 Mon Sep 17 00:00:00 2001 From: Steve Myers Date: Mon, 6 Jan 2025 10:19:41 -0600 Subject: [PATCH] ci(clippy): fix new stricter needless_lifetime errors for rust 1.83 https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes rust-lang/rust-clippy#13286 --- examples/policy.rs | 1 - src/descriptor/mod.rs | 4 +--- src/wallet/tx_builder.rs | 6 +++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/examples/policy.rs b/examples/policy.rs index 64e17825b..1dcd38987 100644 --- a/examples/policy.rs +++ b/examples/policy.rs @@ -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> { env_logger::init_from_env( env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), diff --git a/src/descriptor/mod.rs b/src/descriptor/mod.rs index dfb7bcc5f..17c5800dc 100644 --- a/src/descriptor/mod.rs +++ b/src/descriptor/mod.rs @@ -134,9 +134,7 @@ impl IntoWalletDescriptor for (ExtendedDescriptor, KeyMap) { network: Network, } - impl<'s, 'd> miniscript::Translator - for Translator<'s, 'd> - { + impl miniscript::Translator for Translator<'_, '_> { fn pk(&mut self, pk: &DescriptorPublicKey) -> Result { let secp = &self.secp; diff --git a/src/wallet/tx_builder.rs b/src/wallet/tx_builder.rs index 9ce101217..cdbcee0a4 100644 --- a/src/wallet/tx_builder.rs +++ b/src/wallet/tx_builder.rs @@ -167,7 +167,7 @@ impl std::default::Default for FeePolicy { } } -impl<'a, Cs: Clone, Ctx, D> Clone for TxBuilder<'a, D, Cs, Ctx> { +impl Clone for TxBuilder<'_, D, Cs, Ctx> { fn clone(&self) -> Self { TxBuilder { wallet: self.wallet, @@ -584,7 +584,7 @@ impl<'a, D: BatchDatabase, Cs: CoinSelectionAlgorithm, Ctx: TxBuilderContext> } } -impl<'a, D: BatchDatabase, Cs: CoinSelectionAlgorithm> TxBuilder<'a, D, Cs, CreateTx> { +impl> 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> TxBuilder<'a, D, Cs, C } // methods supported only by bump_fee -impl<'a, D: BatchDatabase> TxBuilder<'a, D, DefaultCoinSelectionAlgorithm, BumpFee> { +impl 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.