book: fix example (#1348)
This commit is contained in:
parent
16a7dc5dc1
commit
aa0ad43810
|
@ -31,8 +31,8 @@ If your function requires instruction data, you can add it by adding arguments t
|
|||
mod hello_anchor {
|
||||
use super::*;
|
||||
pub fn set_data(ctx: Context<SetData>, data: Data) -> ProgramResult {
|
||||
ctx.accounts.my_account.data = init_data.data;
|
||||
ctx.accounts.my_account.age = init_data.age;
|
||||
ctx.accounts.my_account.data = data.data;
|
||||
ctx.accounts.my_account.age = data.age;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue