lang: Fix detection of Accounts derive (#1530)

This commit is contained in:
Tom Linton 2022-03-01 14:01:05 +13:00 committed by GitHub
parent 9c49e7642d
commit 61de9f21e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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));
}