Refactor imports

Clean up some imports, only do the ones that we are about to touch.

- Remove/add whitespace to group by crate
- move modules/types to their module instead of using lib wide
  re-export (this helps minimise future merge conflicts)

Re-order imports, refactor only. No logic changes.
This commit is contained in:
Tobin C. Harding 2022-06-29 14:54:54 +10:00
parent 29f21d6ff5
commit 7c040f4437
3 changed files with 12 additions and 9 deletions

View File

@ -9,15 +9,16 @@
//! signatures, which are placed in the scriptSig.
//!
use core::ops::{Deref, DerefMut};
use crate::io;
use crate::hashes::Hash;
use crate::hash_types::Sighash;
use crate::blockdata::script::Script;
use crate::blockdata::witness::Witness;
use crate::blockdata::transaction::{Transaction, EcdsaSighashType};
use crate::blockdata::witness::Witness;
use crate::consensus::encode;
use crate::io;
use core::ops::{Deref, DerefMut};
use crate::util::sighash;
/// A replacement for SigHashComponents which supports all sighash modes

View File

@ -5,12 +5,14 @@
//!
//! This module provides ECDSA signatures used Bitcoin that can be roundtrip (de)serialized.
use crate::prelude::*;
use core::str::FromStr;
use core::{fmt, iter};
use secp256k1;
use crate::prelude::*;
use crate::hashes::hex::{self, FromHex};
use crate::blockdata::transaction::NonStandardSighashType;
use secp256k1;
use crate::EcdsaSighashType;
use crate::internal_macros::write_err;

View File

@ -2,17 +2,18 @@
use crate::prelude::*;
use crate::io;
use core::fmt;
use core::str::FromStr;
use core::convert::TryFrom;
use secp256k1;
use secp256k1::XOnlyPublicKey;
use crate::blockdata::script::Script;
use crate::blockdata::witness::Witness;
use crate::blockdata::transaction::{Transaction, TxOut, NonStandardSighashType, SighashTypeParseError};
use crate::consensus::encode;
use crate::hashes::{self, hash160, ripemd160, sha256, sha256d};
use secp256k1::XOnlyPublicKey;
use crate::util::bip32::KeySource;
use crate::util::psbt;
use crate::util::psbt::map::Map;
@ -20,7 +21,6 @@ use crate::util::psbt::raw;
use crate::util::psbt::serialize::Deserialize;
use crate::util::psbt::{Error, error};
use crate::util::key::PublicKey;
use crate::util::taproot::{ControlBlock, LeafVersion, TapLeafHash, TapBranchHash};
use crate::util::sighash;
use crate::{EcdsaSighashType, SchnorrSighashType, EcdsaSig, SchnorrSig};