From 64a90192d9d49c3df22d2b5f489ba20222fd941a Mon Sep 17 00:00:00 2001 From: vmammal Date: Sat, 28 Oct 2023 22:32:32 -0400 Subject: [PATCH] refactor: remove old clippy allow attributes These lints either resolved themselves, or the code has changed such that they no longer apply, hence they can be removed with no further changes. `clippy::derivable_impls` `clippy::needless_collect` `clippy::almost_swapped` --- crates/bdk/src/wallet/mod.rs | 3 --- crates/bdk/src/wallet/signer.rs | 1 - example-crates/example_cli/src/lib.rs | 2 -- 3 files changed, 6 deletions(-) diff --git a/crates/bdk/src/wallet/mod.rs b/crates/bdk/src/wallet/mod.rs index deb7d626..0e427087 100644 --- a/crates/bdk/src/wallet/mod.rs +++ b/crates/bdk/src/wallet/mod.rs @@ -2290,9 +2290,6 @@ impl Wallet { ) -> Result<(), MiniscriptPsbtError> { // We need to borrow `psbt` mutably within the loops, so we have to allocate a vec for all // the input utxos and outputs - // - // Clippy complains that the collect is not required, but that's wrong - #[allow(clippy::needless_collect)] let utxos = (0..psbt.inputs.len()) .filter_map(|i| psbt.get_utxo_for(i).map(|utxo| (true, i, utxo))) .chain( diff --git a/crates/bdk/src/wallet/signer.rs b/crates/bdk/src/wallet/signer.rs index 2fe5804c..63784a3f 100644 --- a/crates/bdk/src/wallet/signer.rs +++ b/crates/bdk/src/wallet/signer.rs @@ -820,7 +820,6 @@ pub enum TapLeavesOptions { None, } -#[allow(clippy::derivable_impls)] impl Default for SignOptions { fn default() -> Self { SignOptions { diff --git a/example-crates/example_cli/src/lib.rs b/example-crates/example_cli/src/lib.rs index 2d4f0d70..5d460fef 100644 --- a/example-crates/example_cli/src/lib.rs +++ b/example-crates/example_cli/src/lib.rs @@ -53,7 +53,6 @@ pub struct Args { pub command: Commands, } -#[allow(clippy::almost_swapped)] #[derive(Subcommand, Debug, Clone)] pub enum Commands { #[clap(flatten)] @@ -137,7 +136,6 @@ impl core::fmt::Display for CoinSelectionAlgo { } } -#[allow(clippy::almost_swapped)] #[derive(Subcommand, Debug, Clone)] pub enum AddressCmd { /// Get the next unused address.