Skip to content

Commit

Permalink
lang: Fix detection of Accounts derive (coral-xyz#1530)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlinton authored and NBNARADHYA committed Mar 9, 2022
1 parent fad0161 commit daa2d4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lang/syn/src/idl/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ fn parse_account_derives(ctx: &CrateContext) -> HashMap<String, AccountsStruct>
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));
}
Expand Down

0 comments on commit daa2d4d

Please sign in to comment.