From 16914c66f564ca4980bdba801fb446d0d7855ccf Mon Sep 17 00:00:00 2001 From: OFUZOR CHUKWUEMEKE <64340112+OFUZORCHUKWUEMEKE@users.noreply.github.com> Date: Wed, 11 Sep 2024 00:09:09 +0100 Subject: [PATCH] Fix syntax error in UpdateMovieReview struct by adding missing comma in account attribute (#445) Fix UpdateMovieReview struct: Add missing comma in account attribute The omission of a comma in the `account` attribute macro was causing a syntax error: error: expected non-macro attribute, found attribute macro `account` This commit adds the missing comma, resolving the error and allowing the code to compile correctly. --- content/courses/onchain-development/anchor-pdas.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/courses/onchain-development/anchor-pdas.md b/content/courses/onchain-development/anchor-pdas.md index 28719fba2..da2475756 100644 --- a/content/courses/onchain-development/anchor-pdas.md +++ b/content/courses/onchain-development/anchor-pdas.md @@ -5,7 +5,7 @@ objectives: - Enable and use the `init_if_needed` constraint - Use the `realloc` constraint to reallocate space on an existing account - Use the `close` constraint to close an existing account -description: +description: "Store arbitrary data on Solana, using PDAs, an inbuilt key-value store." --- @@ -674,7 +674,7 @@ pub struct UpdateMovieReview<'info> { mut, seeds = [title.as_bytes(), initializer.key().as_ref()], bump, - realloc = DISCRIMINATOR + MovieAccountState::INIT_SPACE + realloc = DISCRIMINATOR + MovieAccountState::INIT_SPACE, realloc::payer = initializer, realloc::zero = true, )]