From 1c2b5fca350303b0391e617559a75e1ad33bffb4 Mon Sep 17 00:00:00 2001 From: febo Date: Wed, 8 Jul 2026 18:34:05 +0100 Subject: [PATCH] Put import behind cfg --- collections/src/str.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collections/src/str.rs b/collections/src/str.rs index 7ee0af2c..2a25dc6e 100644 --- a/collections/src/str.rs +++ b/collections/src/str.rs @@ -17,12 +17,14 @@ use borsh::{ io::{ErrorKind, Read}, BorshDeserialize, BorshSerialize, }; +#[cfg(any(feature = "borsh", feature = "wincode"))] +use core::str::from_utf8; use { crate::{TrailingVec, U16PrefixedVec, U32PrefixedVec, U64PrefixedVec, U8PrefixedVec}, core::{ fmt::{Debug, Formatter}, ops::Deref, - str::{from_utf8, from_utf8_unchecked}, + str::from_utf8_unchecked, }, }; #[cfg(feature = "wincode")]