From 0389247975c03e1ede241c91e77c64ab379bd3b5 Mon Sep 17 00:00:00 2001 From: kevinheavey Date: Wed, 16 Oct 2024 13:06:09 +0400 Subject: [PATCH] fix solana-instruction when std feature is not activated --- sdk/instruction/src/error.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {