diff --git a/build.rs b/build.rs index f527f43..540dc6a 100644 --- a/build.rs +++ b/build.rs @@ -24,7 +24,10 @@ fn main() -> Result<(), Box> { Ok(()) } -fn generate_idl_types(idl_source_path: &Path, idl_mod_path: &Path) -> Result<(), Box> { +fn generate_idl_types( + idl_source_path: &Path, + idl_mod_path: &Path, +) -> Result<(), Box> { let idl_mod_rs = drift_idl_gen::generate_rust_types(&idl_source_path) .map_err(|err| format!("generating IDL failed: {err:?}"))?; diff --git a/crates/src/drift_idl.rs b/crates/src/drift_idl.rs index b15c0de..ff1d969 100644 --- a/crates/src/drift_idl.rs +++ b/crates/src/drift_idl.rs @@ -2,7 +2,6 @@ #![doc = r""] #![doc = r" Auto-generated IDL types, manual edits do not persist (see `crates/drift-idl-gen`)"] #![doc = r""] -use self::traits::ToAccountMetas; use anchor_lang::{ prelude::{ account, @@ -13,6 +12,8 @@ use anchor_lang::{ }; use serde::{Deserialize, Serialize}; use solana_sdk::{instruction::AccountMeta, pubkey::Pubkey}; + +use self::traits::ToAccountMetas; pub mod traits { use solana_sdk::instruction::AccountMeta; #[doc = r" This is distinct from the anchor_lang version of the trait"] @@ -1989,8 +1990,9 @@ pub mod instructions { } pub mod types { #![doc = r" IDL types"] - use super::*; use std::ops::Mul; + + use super::*; #[doc = ""] #[doc = " backwards compatible u128 deserializing data from rust <=1.76.0 when u/i128 was 8-byte aligned"] #[doc = " https://solana.stackexchange.com/questions/7720/using-u128-without-sacrificing-alignment-8"]