diff --git a/bitcoin/src/blockdata/transaction.rs b/bitcoin/src/blockdata/transaction.rs index b0c2a5a67..3eb5e93fc 100644 --- a/bitcoin/src/blockdata/transaction.rs +++ b/bitcoin/src/blockdata/transaction.rs @@ -10,7 +10,7 @@ //! //! This module provides the structures and functions needed to support transactions. -use core::{cmp, fmt, str}; +use core::{cmp, fmt}; #[cfg(feature = "arbitrary")] use arbitrary::{Arbitrary, Unstructured}; @@ -1342,6 +1342,8 @@ impl<'a> Arbitrary<'a> for Transaction { #[cfg(test)] mod tests { + use core::str; + use hex::{test_hex_unwrap as hex, FromHex}; #[cfg(feature = "serde")] use internals::serde_round_trip; diff --git a/primitives/src/transaction.rs b/primitives/src/transaction.rs index 576729996..e3f570e18 100644 --- a/primitives/src/transaction.rs +++ b/primitives/src/transaction.rs @@ -15,6 +15,7 @@ use core::fmt; #[cfg(feature = "arbitrary")] use arbitrary::{Arbitrary, Unstructured}; use hashes::sha256d; +#[cfg(feature = "alloc")] use internals::write_err; #[cfg(feature = "alloc")] use units::parse;