From daa2d4d76acd5f65142f08126480a5d30695bc27 Mon Sep 17 00:00:00 2001 From: Tom Linton Date: Tue, 1 Mar 2022 14:01:05 +1300 Subject: [PATCH] lang: Fix detection of Accounts derive (#1530) --- lang/syn/src/idl/file.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/syn/src/idl/file.rs b/lang/syn/src/idl/file.rs index 8dda95f28f..7814c9cb92 100644 --- a/lang/syn/src/idl/file.rs +++ b/lang/syn/src/idl/file.rs @@ -353,7 +353,7 @@ fn parse_account_derives(ctx: &CrateContext) -> HashMap ctx.structs() .filter_map(|i_strct| { for attr in &i_strct.attrs { - if attr.tokens.to_string().contains(DERIVE_NAME) { + if attr.path.is_ident("derive") && attr.tokens.to_string().contains(DERIVE_NAME) { let strct = accounts::parse(i_strct).expect("Code not parseable"); return Some((strct.ident.to_string(), strct)); }