From 1d43f8c7b82f367cc032cc7703ad3688f5ea7150 Mon Sep 17 00:00:00 2001 From: vmammal Date: Thu, 16 Nov 2023 18:45:21 -0500 Subject: [PATCH] chore: organize some imports --- crates/bdk/src/wallet/tx_builder.rs | 17 +++++++---------- crates/bdk/tests/wallet.rs | 12 +++++------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/crates/bdk/src/wallet/tx_builder.rs b/crates/bdk/src/wallet/tx_builder.rs index ece41d3e80..8d5327698c 100644 --- a/crates/bdk/src/wallet/tx_builder.rs +++ b/crates/bdk/src/wallet/tx_builder.rs @@ -39,24 +39,21 @@ //! let psbt = tx_builder.finish()?; //! # Ok::<(), anyhow::Error>(()) //! ``` - -use crate::collections::BTreeMap; -use crate::collections::HashSet; use alloc::{boxed::Box, rc::Rc, string::String, vec::Vec}; -use bdk_chain::PersistBackend; use core::cell::RefCell; use core::fmt; use core::marker::PhantomData; +use bdk_chain::PersistBackend; use bitcoin::psbt::{self, PartiallySignedTransaction as Psbt}; -use bitcoin::{absolute, script::PushBytes, OutPoint, ScriptBuf, Sequence, Transaction, Txid}; +use bitcoin::script::PushBytes; +use bitcoin::{absolute, FeeRate, OutPoint, ScriptBuf, Sequence, Transaction, Txid}; use super::coin_selection::{CoinSelectionAlgorithm, DefaultCoinSelectionAlgorithm}; -use super::ChangeSet; -use crate::types::{KeychainKind, LocalOutput, WeightedUtxo}; -use crate::wallet::CreateTxError; -use crate::{Utxo, Wallet}; -use bitcoin::FeeRate; +use super::{ChangeSet, CreateTxError, Wallet}; +use crate::collections::{BTreeMap, HashSet}; +use crate::{KeychainKind, LocalOutput, Utxo, WeightedUtxo}; + /// Context in which the [`TxBuilder`] is valid pub trait TxBuilderContext: core::fmt::Debug + Default + Clone {} diff --git a/crates/bdk/tests/wallet.rs b/crates/bdk/tests/wallet.rs index 1349345a45..c8c7b450ab 100644 --- a/crates/bdk/tests/wallet.rs +++ b/crates/bdk/tests/wallet.rs @@ -13,16 +13,14 @@ use bdk::KeychainKind; use bdk_chain::COINBASE_MATURITY; use bdk_chain::{BlockId, ConfirmationTime}; use bitcoin::hashes::Hash; +use bitcoin::psbt; +use bitcoin::script::PushBytesBuf; use bitcoin::sighash::{EcdsaSighashType, TapSighashType}; -use bitcoin::Amount; -use bitcoin::FeeRate; -use bitcoin::ScriptBuf; +use bitcoin::taproot::TapNodeHash; use bitcoin::{ - absolute, script::PushBytesBuf, taproot::TapNodeHash, Address, OutPoint, Sequence, Transaction, - TxIn, TxOut, Weight, + absolute, Address, Amount, BlockHash, FeeRate, Network, OutPoint, ScriptBuf, Sequence, + Transaction, TxIn, TxOut, Txid, Weight, }; -use bitcoin::{psbt, Network}; -use bitcoin::{BlockHash, Txid}; mod common; use common::*;