diff --git a/lang/syn/src/idl/mod.rs b/lang/syn/src/idl/mod.rs index 3cd27cc4f8..e2979e8b15 100644 --- a/lang/syn/src/idl/mod.rs +++ b/lang/syn/src/idl/mod.rs @@ -1,8 +1,7 @@ +pub mod types; + #[cfg(feature = "idl-build")] pub mod build; #[cfg(feature = "idl-parse")] pub mod parse; - -#[cfg(feature = "idl-types")] -pub mod types; diff --git a/lang/syn/src/idl/types.rs b/lang/syn/src/idl/types.rs index 332da1a955..0aa2956997 100644 --- a/lang/syn/src/idl/types.rs +++ b/lang/syn/src/idl/types.rs @@ -1,5 +1,4 @@ use serde::{Deserialize, Serialize}; -use serde_json::Value as JsonValue; #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct Idl { @@ -19,7 +18,7 @@ pub struct Idl { #[serde(skip_serializing_if = "Option::is_none", default)] pub errors: Option>, #[serde(skip_serializing_if = "Option::is_none", default)] - pub metadata: Option, + pub metadata: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] diff --git a/lang/syn/src/lib.rs b/lang/syn/src/lib.rs index 650f1decab..7edfbf45aa 100644 --- a/lang/syn/src/lib.rs +++ b/lang/syn/src/lib.rs @@ -1,3 +1,14 @@ +pub mod codegen; +pub mod parser; + +#[cfg(feature = "idl-types")] +pub mod idl; + +#[cfg(feature = "hash")] +pub mod hash; +#[cfg(not(feature = "hash"))] +pub(crate) mod hash; + use crate::parser::tts_to_string; use codegen::accounts as accounts_codegen; use codegen::program as program_codegen; @@ -18,14 +29,6 @@ use syn::{ TypePath, }; -pub mod codegen; -#[cfg(feature = "hash")] -pub mod hash; -#[cfg(not(feature = "hash"))] -pub(crate) mod hash; -pub mod idl; -pub mod parser; - #[derive(Debug)] pub struct Program { pub ixs: Vec,