Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit f4fe5f4

Browse files
committed
minor refactor
1 parent 2fd028e commit f4fe5f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/courses/onchain-development/anchor-cpi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ possible options:
212212
organize and prepare your CPI.
213213
```rust
214214
pub fn mint_to<'info>(
215-
ctx: CpiContext<'_, '_, '_, 'info, MintTo<'info>>,
215+
ctx: CpiContext<'_foo, '_bar, '_baz, 'info, MintTo<'info>>,
216216
amount: u64,
217217
) -> Result<()> {
218-
let ix = spl_token::instruction::mint_to(
218+
let instruction_handler = spl_token::instruction::mint_to(
219219
&spl_token::ID,
220220
ctx.accounts.mint.key,
221221
ctx.accounts.to.key,
@@ -224,7 +224,7 @@ possible options:
224224
amount,
225225
)?;
226226
anchor_lang::solana_program::program::invoke_signed(
227-
&ix,
227+
&instruction_handler,
228228
&[
229229
ctx.accounts.to,
230230
ctx.accounts.mint,
@@ -454,7 +454,7 @@ pub struct AddMovieReview<'info> {
454454
seeds=[title.as_bytes(), initializer.key().as_ref()],
455455
bump,
456456
payer = initializer,
457-
space = (DISCRIMINATOR as usize) + MovieAccountState::INIT_SPACE
457+
space = DISCRIMINATOR + MovieAccountState::INIT_SPACE
458458
)]
459459
pub movie_review: Account<'info, MovieAccountState>,
460460
#[account(mut)]

0 commit comments

Comments
 (0)