]> Untitled Git - bdk/commitdiff
refactor: remove old clippy allow attributes
authorvmammal <valuedmammal@protonmail.com>
Sun, 29 Oct 2023 02:32:32 +0000 (22:32 -0400)
committervmammal <valuedmammal@protonmail.com>
Wed, 31 Jan 2024 16:11:26 +0000 (11:11 -0500)
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
crates/bdk/src/wallet/signer.rs
example-crates/example_cli/src/lib.rs

index deb7d626ec38273c2c1b26c6f6580a3af47c1cc0..0e42708767c2add1c92a73730590f4789099d57d 100644 (file)
@@ -2290,9 +2290,6 @@ impl<D> Wallet<D> {
     ) -> 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(
index 2fe5804cec8fac44e648c53369c4b0ee945cecae..63784a3fd9d9902cafceee5959597b129efa4376 100644 (file)
@@ -820,7 +820,6 @@ pub enum TapLeavesOptions {
     None,
 }
 
-#[allow(clippy::derivable_impls)]
 impl Default for SignOptions {
     fn default() -> Self {
         SignOptions {
index 2d4f0d7010ded8bf96a11a8a009edcf59eea20ee..5d460fef29081af1435fb6382928fa192e08cc79 100644 (file)
@@ -53,7 +53,6 @@ pub struct Args<CS: clap::Subcommand, S: clap::Args> {
     pub command: Commands<CS, S>,
 }
 
-#[allow(clippy::almost_swapped)]
 #[derive(Subcommand, Debug, Clone)]
 pub enum Commands<CS: clap::Subcommand, S: clap::Args> {
     #[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.