From 8fe1e29f16640ddbbfa23d93484c1a41a14e6f40 Mon Sep 17 00:00:00 2001 From: CanardMandarin Date: Sun, 7 May 2023 00:00:58 +0200 Subject: [PATCH] Fix match condition --- lang/syn/src/parser/accounts/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/syn/src/parser/accounts/mod.rs b/lang/syn/src/parser/accounts/mod.rs index d0c8aee763..19a525b8b5 100644 --- a/lang/syn/src/parser/accounts/mod.rs +++ b/lang/syn/src/parser/accounts/mod.rs @@ -162,7 +162,7 @@ fn constraints_cross_checks(fields: &[AccountField]) -> ParseResult<()> { )); } } - match kind { + match &field.constraints.init.as_ref().unwrap().kind { // This doesn't catch cases like account.key() or account.key. // My guess is that doesn't happen often and we can revisit // this if I'm wrong.