Skip to content

Remove CreateTxError::Bdk variant and unused bdk::Error variants #472

Remove CreateTxError::Bdk variant and unused bdk::Error variants

Remove CreateTxError::Bdk variant and unused bdk::Error variants #472

GitHub Actions / clippy failed Oct 13, 2023 in 0s

clippy

27 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 27
Warning 0
Note 0
Help 0

Versions

  • rustc 1.67.0 (fc594f156 2023-01-24)
  • cargo 1.67.0 (8ecd4f20a 2023-01-10)
  • clippy 0.1.67 (fc594f1 2023-01-24)

Annotations

Check failure on line 1436 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`?` couldn't convert the error to `error::Error`

error[E0277]: `?` couldn't convert the error to `error::Error`
    --> crates/bdk/src/wallet/mod.rs:1436:82
     |
1436 |         let psbt = self.complete_transaction(tx, coin_selection.selected, params)?;
     |                                                                                  ^ the trait `core::convert::From<wallet::CreateTxError<<D as bdk_chain::PersistBackend<wallet::ChangeSet>>::WriteError>>` is not implemented for `error::Error`
     |
     = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
     = help: the following other types implement trait `core::convert::From<T>`:
               <error::Error as core::convert::From<bitcoin::bip32::Error>>
               <error::Error as core::convert::From<bitcoin::psbt::Error>>
               <error::Error as core::convert::From<descriptor::error::Error>>
               <error::Error as core::convert::From<error::MiniscriptPsbtError>>
               <error::Error as core::convert::From<keys::KeyError>>
               <error::Error as core::convert::From<miniscript::Error>>
               <error::Error as core::convert::From<wallet::signer::SignerError>>
     = note: required for `core::result::Result<bitcoin::psbt::PartiallySignedTransaction, error::Error>` to implement `core::ops::FromResidual<core::result::Result<core::convert::Infallible, wallet::CreateTxError<<D as bdk_chain::PersistBackend<wallet::ChangeSet>>::WriteError>>>`

Check failure on line 1406 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1406:28
     |
1406 |                 return Err(CreateTxError::NoRecipients);
     |                        --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |                        |
     |                        arguments to this enum variant are incorrect
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1403 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1400:32
     |
1400 |                       return Err(CreateTxError::InsufficientFunds {
     |  ____________________________---_^
     | |                            |
     | |                            arguments to this enum variant are incorrect
1401 | |                         needed: *dust_threshold,
1402 | |                         available: remaining_amount.saturating_sub(*change_fee),
1403 | |                     });
     | |_____________________^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1370 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`?` couldn't convert the error to `error::Error`

error[E0277]: `?` couldn't convert the error to `error::Error`
    --> crates/bdk/src/wallet/mod.rs:1370:10
     |
1370 |         )?;
     |          ^ the trait `core::convert::From<wallet::coin_selection::Error>` is not implemented for `error::Error`
     |
     = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
     = help: the following other types implement trait `core::convert::From<T>`:
               <error::Error as core::convert::From<bitcoin::bip32::Error>>
               <error::Error as core::convert::From<bitcoin::psbt::Error>>
               <error::Error as core::convert::From<descriptor::error::Error>>
               <error::Error as core::convert::From<error::MiniscriptPsbtError>>
               <error::Error as core::convert::From<keys::KeyError>>
               <error::Error as core::convert::From<miniscript::Error>>
               <error::Error as core::convert::From<wallet::signer::SignerError>>
     = note: required for `core::result::Result<bitcoin::psbt::PartiallySignedTransaction, error::Error>` to implement `core::ops::FromResidual<core::result::Result<core::convert::Infallible, wallet::coin_selection::Error>>`

Check failure on line 1359 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`?` couldn't convert the error to `error::Error`

error[E0277]: `?` couldn't convert the error to `error::Error`
    --> crates/bdk/src/wallet/mod.rs:1359:70
     |
1359 |                 self.persist.commit().map_err(CreateTxError::Persist)?;
     |                                                                      ^ the trait `core::convert::From<wallet::CreateTxError<<D as bdk_chain::PersistBackend<wallet::ChangeSet>>::WriteError>>` is not implemented for `error::Error`
     |
     = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
     = help: the following other types implement trait `core::convert::From<T>`:
               <error::Error as core::convert::From<bitcoin::bip32::Error>>
               <error::Error as core::convert::From<bitcoin::psbt::Error>>
               <error::Error as core::convert::From<descriptor::error::Error>>
               <error::Error as core::convert::From<error::MiniscriptPsbtError>>
               <error::Error as core::convert::From<keys::KeyError>>
               <error::Error as core::convert::From<miniscript::Error>>
               <error::Error as core::convert::From<wallet::signer::SignerError>>
     = note: required for `core::result::Result<bitcoin::psbt::PartiallySignedTransaction, error::Error>` to implement `core::ops::FromResidual<core::result::Result<core::convert::Infallible, wallet::CreateTxError<<D as bdk_chain::PersistBackend<wallet::ChangeSet>>::WriteError>>>`

Check failure on line 1333 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1333:24
     |
1333 |             return Err(CreateTxError::ChangePolicyDescriptor);
     |                    --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |                    |
     |                    arguments to this enum variant are incorrect
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1300 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1300:28
     |
1300 |                 return Err(CreateTxError::OutputBelowDustLimit(index));
     |                        --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |                        |
     |                        arguments to this enum variant are incorrect
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1286 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1286:24
     |
1286 |             return Err(CreateTxError::NoUtxosSelected);
     |                    --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |                    |
     |                    arguments to this enum variant are incorrect
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1271 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1269:36
     |
1269 |                           return Err(CreateTxError::FeeRateTooLow {
     |  ________________________________---_^
     | |                                |
     | |                                arguments to this enum variant are incorrect
1270 | |                             required: required_feerate,
1271 | |                         });
     | |_________________________^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1260 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1258:36
     |
1258 |                           return Err(CreateTxError::FeeTooLow {
     |  ________________________________---_^
     | |                                |
     | |                                arguments to this enum variant are incorrect
1259 | |                             required: previous_fee.absolute,
1260 | |                         });
     | |_________________________^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1239 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1239:28
     |
1239 |                 return Err(CreateTxError::RbfSequenceCsv { rbf, csv })
     |                        --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |                        |
     |                        arguments to this enum variant are incorrect
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1233 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1233:28
     |
1233 |                 return Err(CreateTxError::RbfSequence)
     |                        --- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |                        |
     |                        arguments to this enum variant are incorrect
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1214 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1211:28
     |
1211 |                   return Err(CreateTxError::LockTime {
     |  ________________________---_^
     | |                        |
     | |                        arguments to this enum variant are incorrect
1212 | |                     requested: x,
1213 | |                     required: requirements.timelock.unwrap(),
1214 | |                 })
     | |_________________^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1163 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1163:28
     |
1163 |                 return Err(CreateTxError::Version1Csv)
     |                        --- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |                        |
     |                        arguments to this enum variant are incorrect
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1161 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1161:56
     |
1161 |             Some(tx_builder::Version(0)) => return Err(CreateTxError::Version0),
     |                                                    --- ^^^^^^^^^^^^^^^^^^^^^^^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |                                                    |
     |                                                    arguments to this enum variant are incorrect
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1157 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`?` couldn't convert the error to `error::Error`

error[E0277]: `?` couldn't convert the error to `error::Error`
    --> crates/bdk/src/wallet/mod.rs:1157:84
     |
1157 |             external_requirements.merge(&internal_requirements.unwrap_or_default())?;
     |                                                                                    ^ the trait `core::convert::From<descriptor::policy::PolicyError>` is not implemented for `error::Error`
     |
     = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
     = help: the following other types implement trait `core::convert::From<T>`:
               <error::Error as core::convert::From<bitcoin::bip32::Error>>
               <error::Error as core::convert::From<bitcoin::psbt::Error>>
               <error::Error as core::convert::From<descriptor::error::Error>>
               <error::Error as core::convert::From<error::MiniscriptPsbtError>>
               <error::Error as core::convert::From<keys::KeyError>>
               <error::Error as core::convert::From<miniscript::Error>>
               <error::Error as core::convert::From<wallet::signer::SignerError>>
     = note: required for `core::result::Result<bitcoin::psbt::PartiallySignedTransaction, error::Error>` to implement `core::ops::FromResidual<core::result::Result<core::convert::Infallible, descriptor::policy::PolicyError>>`

Check failure on line 1154 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`?` couldn't convert the error to `error::Error`

error[E0277]: `?` couldn't convert the error to `error::Error`
    --> crates/bdk/src/wallet/mod.rs:1154:25
     |
1154 |             .transpose()?;
     |                         ^ the trait `core::convert::From<wallet::CreateTxError<<D as bdk_chain::PersistBackend<wallet::ChangeSet>>::WriteError>>` is not implemented for `error::Error`
     |
     = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
     = help: the following other types implement trait `core::convert::From<T>`:
               <error::Error as core::convert::From<bitcoin::bip32::Error>>
               <error::Error as core::convert::From<bitcoin::psbt::Error>>
               <error::Error as core::convert::From<descriptor::error::Error>>
               <error::Error as core::convert::From<error::MiniscriptPsbtError>>
               <error::Error as core::convert::From<keys::KeyError>>
               <error::Error as core::convert::From<miniscript::Error>>
               <error::Error as core::convert::From<wallet::signer::SignerError>>
     = note: required for `core::result::Result<bitcoin::psbt::PartiallySignedTransaction, error::Error>` to implement `core::ops::FromResidual<core::result::Result<core::convert::Infallible, wallet::CreateTxError<<D as bdk_chain::PersistBackend<wallet::ChangeSet>>::WriteError>>>`

Check failure on line 1142 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`?` couldn't convert the error to `error::Error`

error[E0277]: `?` couldn't convert the error to `error::Error`
    --> crates/bdk/src/wallet/mod.rs:1142:10
     |
1142 |         )?;
     |          ^ the trait `core::convert::From<descriptor::policy::PolicyError>` is not implemented for `error::Error`
     |
     = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
     = help: the following other types implement trait `core::convert::From<T>`:
               <error::Error as core::convert::From<bitcoin::bip32::Error>>
               <error::Error as core::convert::From<bitcoin::psbt::Error>>
               <error::Error as core::convert::From<descriptor::error::Error>>
               <error::Error as core::convert::From<error::MiniscriptPsbtError>>
               <error::Error as core::convert::From<keys::KeyError>>
               <error::Error as core::convert::From<miniscript::Error>>
               <error::Error as core::convert::From<wallet::signer::SignerError>>
     = note: required for `core::result::Result<bitcoin::psbt::PartiallySignedTransaction, error::Error>` to implement `core::ops::FromResidual<core::result::Result<core::convert::Infallible, descriptor::policy::PolicyError>>`

Check failure on line 1133 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1131:28
     |
1131 |                   return Err(CreateTxError::SpendingPolicyRequired(
     |  ________________________---_^
     | |                        |
     | |                        arguments to this enum variant are incorrect
1132 | |                     KeychainKind::Internal,
1133 | |                 ));
     | |_________________^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1123 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
    --> crates/bdk/src/wallet/mod.rs:1121:24
     |
1121 |               return Err(CreateTxError::SpendingPolicyRequired(
     |  ____________________---_^
     | |                    |
     | |                    arguments to this enum variant are incorrect
1122 | |                 KeychainKind::External,
1123 | |             ));
     | |_____________^ expected enum `error::Error`, found enum `wallet::CreateTxError`
     |
     = note: expected enum `error::Error`
                found enum `wallet::CreateTxError<_>`
note: tuple variant defined here
    --> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:513:5

Check failure on line 1113 in crates/bdk/src/wallet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`?` couldn't convert the error to `error::Error`

error[E0277]: `?` couldn't convert the error to `error::Error`
    --> crates/bdk/src/wallet/mod.rs:1113:25
     |
1113 |             .transpose()?;
     |                         ^ the trait `core::convert::From<wallet::CreateTxError<<D as bdk_chain::PersistBackend<wallet::ChangeSet>>::WriteError>>` is not implemented for `error::Error`
     |
     = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
     = help: the following other types implement trait `core::convert::From<T>`:
               <error::Error as core::convert::From<bitcoin::bip32::Error>>
               <error::Error as core::convert::From<bitcoin::psbt::Error>>
               <error::Error as core::convert::From<descriptor::error::Error>>
               <error::Error as core::convert::From<error::MiniscriptPsbtError>>
               <error::Error as core::convert::From<keys::KeyError>>
               <error::Error as core::convert::From<miniscript::Error>>
               <error::Error as core::convert::From<wallet::signer::SignerError>>
     = note: required for `core::result::Result<bitcoin::psbt::PartiallySignedTransaction, error::Error>` to implement `core::ops::FromResidual<core::result::Result<core::convert::Infallible, wallet::CreateTxError<<D as bdk_chain::PersistBackend<wallet::ChangeSet>>::WriteError>>>`

Check failure on line 53 in crates/bdk/src/wallet/tx_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `crate::wallet::CreateTxError`

error: unused import: `crate::wallet::CreateTxError`
  --> crates/bdk/src/wallet/tx_builder.rs:53:5
   |
53 | use crate::wallet::CreateTxError;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 52 in crates/bdk/src/wallet/tx_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `super::ChangeSet`

error: unused import: `super::ChangeSet`
  --> crates/bdk/src/wallet/tx_builder.rs:52:5
   |
52 | use super::ChangeSet;
   |     ^^^^^^^^^^^^^^^^

Check failure on line 48 in crates/bdk/src/wallet/tx_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `PartiallySignedTransaction as Psbt`

error: unused import: `PartiallySignedTransaction as Psbt`
  --> crates/bdk/src/wallet/tx_builder.rs:48:27
   |
48 | use bitcoin::psbt::{self, PartiallySignedTransaction as Psbt};
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 44 in crates/bdk/src/wallet/tx_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `bdk_chain::PersistBackend`

error: unused import: `bdk_chain::PersistBackend`
  --> crates/bdk/src/wallet/tx_builder.rs:44:5
   |
44 | use bdk_chain::PersistBackend;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D unused-imports` implied by `-D warnings`