diff --git a/sdk/instruction/src/error.rs b/sdk/instruction/src/error.rs index 270659f8de054e..ea213cd8516aa2 100644 --- a/sdk/instruction/src/error.rs +++ b/sdk/instruction/src/error.rs @@ -1,8 +1,8 @@ +use core::fmt; #[cfg(feature = "frozen-abi")] use solana_frozen_abi_macro::{AbiEnumVisitor, AbiExample}; #[cfg(feature = "std")] use { - core::fmt, num_traits::ToPrimitive, std::string::{String, ToString}, }; @@ -453,6 +453,7 @@ impl fmt::Display for LamportsError { } } +#[cfg(feature = "std")] impl From for InstructionError { fn from(error: LamportsError) -> Self { match error {