From c16b68a92982f02c337c84aa0a6bc47aaca97f95 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 19 Oct 2023 09:30:52 +1100 Subject: [PATCH] Feature guard write_err import We only use the `write_err` macro when the "alloc" feature is enabled, the import statement should be feature guarded. Clears a clippy warning. --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 1f7989b2a..5afedd265 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -142,6 +142,7 @@ pub mod segwit; use alloc::{string::String, vec::Vec}; use core::fmt; +#[cfg(feature = "alloc")] use crate::error::write_err; #[cfg(doc)] use crate::primitives::decode::CheckedHrpstring;