Skip to content

Commit

Permalink
refactor: remove old clippy allow attributes
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
ValuedMammal committed Jan 31, 2024
1 parent f099b42 commit 64a9019
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions crates/bdk/src/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion crates/bdk/src/wallet/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,6 @@ pub enum TapLeavesOptions {
None,
}

#[allow(clippy::derivable_impls)]
impl Default for SignOptions {
fn default() -> Self {
SignOptions {
Expand Down
2 changes: 0 additions & 2 deletions example-crates/example_cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 64a9019

Please sign in to comment.