Fix clippy errors

This commit is contained in:
thunderbiscuit
2023-03-14 08:18:50 -04:00
parent 40263b425e
commit 8e51756a3a
3 changed files with 15 additions and 302 deletions

View File

@@ -190,8 +190,8 @@ dictionary OutPoint {
dictionary TxIn {
OutPoint previous_output;
Script script_sig;
u32 sequence;
sequence<sequence<u8>> witness;
u32 sequence;
sequence<sequence<u8>> witness;
};
dictionary TxOut {

View File

@@ -3,7 +3,10 @@ use bdk::bitcoin::{Address as BdkAddress, Network, OutPoint as BdkOutPoint, Sequ
use bdk::database::any::AnyDatabase;
use bdk::database::{AnyDatabaseConfig, ConfigurableDatabase};
use bdk::wallet::tx_builder::ChangeSpendPolicy;
use bdk::{FeeRate, SignOptions, SyncOptions as BdkSyncOptions, Wallet as BdkWallet};
use bdk::{
FeeRate, LocalUtxo as BdkLocalUtxo, SignOptions, SyncOptions as BdkSyncOptions,
Wallet as BdkWallet,
};
use std::collections::HashSet;
use std::ops::Deref;
use std::str::FromStr;
@@ -128,8 +131,8 @@ impl Wallet {
/// Return the list of unspent outputs of this wallet. Note that this method only operates on the internal database,
/// which first needs to be Wallet.sync manually.
pub(crate) fn list_unspent(&self) -> Result<Vec<LocalUtxo>, BdkError> {
let unspents = self.get_wallet().list_unspent()?;
Ok(unspents.iter().map(|u| LocalUtxo::from_utxo(u)).collect())
let unspents: Vec<BdkLocalUtxo> = self.get_wallet().list_unspent()?;
Ok(unspents.iter().map(LocalUtxo::from_utxo).collect())
}
}