Merge rust-bitcoin/rust-bitcoin#3271: Move import inside feature gate

a184066660 Move import inside feature gate (Tobin C. Harding)

Pull request description:

  The `String` type is only used if the `serde` feature is enabled, move the import statement inside the already feature gated block.

ACKs for top commit:
  apoelstra:
    ACK a184066660 successfully ran local tests; sure
  Kixunil:
    ACK a184066660

Tree-SHA512: 688adb1e4489b0242856ac36ed9cf3503b147b84954cf1e6fd34b5e708ed6c1dd92da91e739243face1c1b4e4c8b19ce88e215117bef2a7af2e732859a6e108a
This commit is contained in:
merge-script 2024-08-31 18:22:51 +00:00
commit 2a54c1c1f2
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,7 @@ use io::{BufRead, Write};
use crate::consensus::encode::{Error, MAX_VEC_SIZE};
use crate::consensus::{Decodable, Encodable, WriteExt};
use crate::crypto::ecdsa;
use crate::prelude::{String, Vec};
use crate::prelude::Vec;
#[cfg(doc)]
use crate::script::ScriptExt as _;
use crate::taproot::{self, TAPROOT_ANNEX_PREFIX};
@ -534,6 +534,8 @@ impl<'de> serde::Deserialize<'de> for Witness {
where
D: serde::Deserializer<'de>,
{
use crate::prelude::String;
struct Visitor; // Human-readable visitor.
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = Witness;