Skip to content

Commit f862ed7

Browse files
committed
Merge rust-bitcoin#4885: primitives: Use new import policy
02386cd primitives: Use new import policy (Tobin C. Harding) Pull request description: Now we want to only import using crate re-exports if possible in `bitcoin` and `primitives`. We fixed `bitcoin` already, now do `primitives`. ACKs for top commit: apoelstra: ACK 02386cd; successfully ran local tests Tree-SHA512: a020351710fba92eaba6fdc7e18276c0ea342dff11d2995fc14933a43e18cf2d8ab8cf19ae2d8d89177992a3ff394b2be70bdf4ce42202969b8385ce18eedeed
2 parents a9fc126 + 02386cd commit f862ed7

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

primitives/src/block.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@ use core::marker::PhantomData;
1414
#[cfg(feature = "arbitrary")]
1515
use arbitrary::{Arbitrary, Unstructured};
1616
use hashes::{sha256d, HashEngine as _};
17-
use units::BlockTime;
1817

19-
use crate::merkle_tree::TxMerkleNode;
20-
#[cfg(feature = "alloc")]
21-
use crate::merkle_tree::WitnessMerkleNode;
22-
use crate::pow::CompactTarget;
2318
#[cfg(feature = "alloc")]
2419
use crate::prelude::Vec;
2520
#[cfg(feature = "alloc")]
26-
use crate::transaction::Transaction;
21+
use crate::{Transaction, WitnessMerkleNode};
22+
use crate::{BlockTime, CompactTarget, TxMerkleNode};
2723

2824
#[rustfmt::skip] // Keep public re-exports separate.
2925
#[doc(inline)]

primitives/src/transaction.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,13 @@ use hashes::sha256d;
2424
use internals::compact_size;
2525
#[cfg(feature = "hex")]
2626
use internals::write_err;
27-
#[cfg(feature = "alloc")]
28-
use units::locktime::absolute;
2927
#[cfg(feature = "hex")]
3028
use units::parse_int;
31-
#[cfg(feature = "alloc")]
32-
use units::sequence::Sequence;
33-
#[cfg(feature = "alloc")]
34-
use units::{Amount, Weight};
3529

3630
#[cfg(feature = "alloc")]
3731
use crate::prelude::Vec;
3832
#[cfg(feature = "alloc")]
39-
use crate::script::{ScriptPubKeyBuf, ScriptSigBuf};
40-
#[cfg(feature = "alloc")]
41-
use crate::witness::Witness;
33+
use crate::{absolute, Amount, ScriptPubKeyBuf, ScriptSigBuf, Sequence, Weight, Witness};
4234

4335
/// Bitcoin transaction.
4436
///

0 commit comments

Comments
 (0)