Skip to content

Commit

Permalink
fix required features for frozen-abi
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Sep 12, 2024
1 parent ca44164 commit 19d52e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions sdk/instruction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ frozen-abi = [
"dep:rustc_version",
"dep:solana-frozen-abi",
"dep:solana-frozen-abi-macro",
"serde",
"std",
]
serde = [
"dep:serde",
Expand Down
7 changes: 5 additions & 2 deletions sdk/instruction/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#[cfg(all(feature = "serde", feature = "std"))]
use serde_derive::{Deserialize, Serialize};
#[cfg(all(feature = "frozen-abi", feature = "std"))]
use solana_frozen_abi_macro::{AbiEnumVisitor, AbiExample};
#[cfg(feature = "std")]
use {
core::fmt,
num_traits::ToPrimitive,
std::string::{String, ToString},
};
#[cfg(feature = "frozen-abi")]
use {
solana_frozen_abi_macro::{AbiEnumVisitor, AbiExample},
std::format,
};

/// Builtin return values occupy the upper 32 bits
const BUILTIN_BIT_SHIFT: usize = 32;
Expand Down

0 comments on commit 19d52e8

Please sign in to comment.