Skip to content

Commit

Permalink
Merge #966: Clean up import aliases
Browse files Browse the repository at this point in the history
7307363 Use qualified path instead of alias (Tobin C. Harding)
80e0fb7 Remove unnecessary 'as' statement (Tobin C. Harding)
21e1b9d 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 7307363
  sanket1729:
    ACK 7307363. These are clean improvements
  Kixunil:
    ACK 7307363

Tree-SHA512: f6ed3ede11d2803dbcb4584f11632fc47d28e525b5bf4de7794d400117f2d7c9ffce5bdff274877a63a519d5799bba2224fc39105d623da4bccad863005e171f
  • Loading branch information
sanket1729 committed Apr 22, 2022
2 parents d6f5d98 + 7307363 commit b169925
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/blockdata/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use prelude::*;

use core::default::Default;

use hashes::hex::{HexIterator, Error as HexError};
use hashes::hex::{self, HexIterator};
use hashes::sha256d;
use blockdata::opcodes;
use blockdata::script;
Expand Down Expand Up @@ -99,7 +99,7 @@ fn bitcoin_genesis_tx() -> Transaction {
});

// Outputs
let script_bytes: Result<Vec<u8>, HexError> =
let script_bytes: Result<Vec<u8>, hex::Error> =
HexIterator::new("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f").unwrap()
.collect();
let out_script = script::Builder::new()
Expand Down
2 changes: 1 addition & 1 deletion src/util/bip158.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

use prelude::*;

use io::{self as io, Cursor};
use io::{self, Cursor};
use core::fmt::{self, Display, Formatter};
use core::cmp::{self, Ordering};

Expand Down
6 changes: 2 additions & 4 deletions src/util/schnorr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,18 @@
use core::fmt;
use prelude::*;

use secp256k1::{XOnlyPublicKey as _XOnlyPublicKey, KeyPair as _KeyPair};

use secp256k1::{self, Secp256k1, Verification, constants};
use hashes::Hash;
use util::taproot::{TapBranchHash, TapTweakHash};
use SchnorrSighashType;

/// Deprecated re-export of [`secp256k1::XOnlyPublicKey`]
#[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(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
pub type UntweakedPublicKey = ::XOnlyPublicKey;
Expand Down

0 comments on commit b169925

Please sign in to comment.