diff --git a/src/util/address.rs b/src/util/address.rs index 26c892a..2449945 100644 --- a/src/util/address.rs +++ b/src/util/address.rs @@ -137,7 +137,6 @@ impl Address { /// Create a witness pay to script hash address pub fn p2wsh (script: &script::Script, network: Network) -> Address { use bitcoin_hashes::sha256; - use bitcoin_hashes::Hash; Address { network: network, @@ -156,8 +155,6 @@ impl Address { /// This is a segwit address type that looks familiar (as p2sh) to legacy clients pub fn p2shwsh (script: &script::Script, network: Network) -> Address { use bitcoin_hashes::sha256; - use bitcoin_hashes::Hash; - use bitcoin_hashes::hash160; let ws = script::Builder::new().push_int(0) .push_slice(&sha256::Hash::hash(&script[..])[..]) diff --git a/src/util/psbt/raw.rs b/src/util/psbt/raw.rs index 21a58b6..3f7fbba 100644 --- a/src/util/psbt/raw.rs +++ b/src/util/psbt/raw.rs @@ -43,9 +43,12 @@ pub struct Pair { impl fmt::Display for Key { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - use hex; - - write!(f, "type: {:#x}, key: {}", self.type_value, hex::encode(&self.key)) + write!( + f, + "type: {:#x}, key: {}", + self.type_value, + ::hex::encode(&self.key) + ) } }