Merge rust-bitcoin/rust-bitcoin#966: Clean up import aliases

7307363c2e Use qualified path instead of alias (Tobin C. Harding)
80e0fb7673 Remove unnecessary 'as' statement (Tobin C. Harding)
21e1b9dbbd Use secp256k1 qualified path instead of underscore (Tobin C. Harding)

Pull request description:

  Three trivial clean ups of import aliases.

ACKs for top commit:
  apoelstra:
    ACK 7307363c2e
  sanket1729:
    ACK 7307363c2e. These are clean improvements
  Kixunil:
    ACK 7307363c2e

Tree-SHA512: f6ed3ede11d2803dbcb4584f11632fc47d28e525b5bf4de7794d400117f2d7c9ffce5bdff274877a63a519d5799bba2224fc39105d623da4bccad863005e171f
This commit is contained in:
sanket1729 2022-04-22 12:31:54 -07:00
commit b169925c24
No known key found for this signature in database
GPG Key ID: 648FFB183E0870A2
3 changed files with 5 additions and 7 deletions

View File

@ -23,7 +23,7 @@ use prelude::*;
use core::default::Default; use core::default::Default;
use hashes::hex::{HexIterator, Error as HexError}; use hashes::hex::{self, HexIterator};
use hashes::sha256d; use hashes::sha256d;
use blockdata::opcodes; use blockdata::opcodes;
use blockdata::script; use blockdata::script;
@ -99,7 +99,7 @@ fn bitcoin_genesis_tx() -> Transaction {
}); });
// Outputs // Outputs
let script_bytes: Result<Vec<u8>, HexError> = let script_bytes: Result<Vec<u8>, hex::Error> =
HexIterator::new("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f").unwrap() HexIterator::new("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f").unwrap()
.collect(); .collect();
let out_script = script::Builder::new() let out_script = script::Builder::new()

View File

@ -47,7 +47,7 @@
use prelude::*; use prelude::*;
use io::{self as io, Cursor}; use io::{self, Cursor};
use core::fmt::{self, Display, Formatter}; use core::fmt::{self, Display, Formatter};
use core::cmp::{self, Ordering}; use core::cmp::{self, Ordering};

View File

@ -20,8 +20,6 @@
use core::fmt; use core::fmt;
use prelude::*; use prelude::*;
use secp256k1::{XOnlyPublicKey as _XOnlyPublicKey, KeyPair as _KeyPair};
use secp256k1::{self, Secp256k1, Verification, constants}; use secp256k1::{self, Secp256k1, Verification, constants};
use hashes::Hash; use hashes::Hash;
use util::taproot::{TapBranchHash, TapTweakHash}; use util::taproot::{TapBranchHash, TapTweakHash};
@ -29,11 +27,11 @@ use SchnorrSighashType;
/// Deprecated re-export of [`secp256k1::XOnlyPublicKey`] /// Deprecated re-export of [`secp256k1::XOnlyPublicKey`]
#[deprecated(since = "0.28.0", note = "Please use `util::key::XOnlyPublicKey` instead")] #[deprecated(since = "0.28.0", note = "Please use `util::key::XOnlyPublicKey` instead")]
pub type XOnlyPublicKey = _XOnlyPublicKey; pub type XOnlyPublicKey = secp256k1::XOnlyPublicKey;
/// Deprecated re-export of [`secp256k1::KeyPair`] /// Deprecated re-export of [`secp256k1::KeyPair`]
#[deprecated(since = "0.28.0", note = "Please use `util::key::KeyPair` instead")] #[deprecated(since = "0.28.0", note = "Please use `util::key::KeyPair` instead")]
pub type KeyPair = _KeyPair; pub type KeyPair = secp256k1::KeyPair;
/// Untweaked BIP-340 X-coord-only public key /// Untweaked BIP-340 X-coord-only public key
pub type UntweakedPublicKey = ::XOnlyPublicKey; pub type UntweakedPublicKey = ::XOnlyPublicKey;