Skip to content

Commit 9fae3e0

Browse files
author
ChallengeDev210
committed
Merge rust-bitcoin/rust-bitcoin#966: Clean up import aliases
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
2 parents 995dd09 + de9d85d commit 9fae3e0

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/blockdata/constants.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use prelude::*;
2323

2424
use core::default::Default;
2525

26-
use hashes::hex::{HexIterator, Error as HexError};
26+
use hashes::hex::{self, HexIterator};
2727
use hashes::sha256d;
2828
use blockdata::opcodes;
2929
use blockdata::script;
@@ -99,7 +99,7 @@ fn bitcoin_genesis_tx() -> Transaction {
9999
});
100100

101101
// Outputs
102-
let script_bytes: Result<Vec<u8>, HexError> =
102+
let script_bytes: Result<Vec<u8>, hex::Error> =
103103
HexIterator::new("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f").unwrap()
104104
.collect();
105105
let out_script = script::Builder::new()

src/util/bip158.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
4848
use prelude::*;
4949

50-
use io::{self as io, Cursor};
50+
use io::{self, Cursor};
5151
use core::fmt::{self, Display, Formatter};
5252
use core::cmp::{self, Ordering};
5353

src/util/schnorr.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,18 @@
2020
use core::fmt;
2121
use prelude::*;
2222

23-
use secp256k1::{XOnlyPublicKey as _XOnlyPublicKey, KeyPair as _KeyPair};
24-
2523
use secp256k1::{self, Secp256k1, Verification, constants};
2624
use hashes::Hash;
2725
use util::taproot::{TapBranchHash, TapTweakHash};
2826
use SchnorrSighashType;
2927

3028
/// Deprecated re-export of [`secp256k1::XOnlyPublicKey`]
3129
#[deprecated(since = "0.28.0", note = "Please use `util::key::XOnlyPublicKey` instead")]
32-
pub type XOnlyPublicKey = _XOnlyPublicKey;
30+
pub type XOnlyPublicKey = secp256k1::XOnlyPublicKey;
3331

3432
/// Deprecated re-export of [`secp256k1::KeyPair`]
3533
#[deprecated(since = "0.28.0", note = "Please use `util::key::KeyPair` instead")]
36-
pub type KeyPair = _KeyPair;
34+
pub type KeyPair = secp256k1::KeyPair;
3735

3836
/// Untweaked BIP-340 X-coord-only public key
3937
pub type UntweakedPublicKey = ::XOnlyPublicKey;

0 commit comments

Comments
 (0)