Skip to content

Commit

Permalink
Fix syntax error in UpdateMovieReview struct by adding missing comma …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
OFUZORCHUKWUEMEKE authored Sep 10, 2024
1 parent f2ffef5 commit 16914c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/courses/onchain-development/anchor-pdas.md
Original file line number Diff line number Diff line change
Expand Up @@ -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."
---

Expand Down Expand Up @@ -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,
)]
Expand Down

0 comments on commit 16914c6

Please sign in to comment.