Skip to content

Commit

Permalink
fix unused variable warning on new projects
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemaccana committed Apr 25, 2024
1 parent 81c8c55 commit ab629f9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cli/src/rust_template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ declare_id!("{}");
pub mod {} {{
use super::*;
pub fn initialize(ctx: Context<Initialize>) -> Result<()> {{
pub fn initialize(context: Context<Initialize>) -> Result<()> {{
msg!("Greetings from: {{:?}}", context.program_id);
Ok(())
}}
}}
Expand Down Expand Up @@ -99,8 +100,8 @@ declare_id!("{}");
pub mod {} {{
use super::*;
pub fn initialize(ctx: Context<Initialize>) -> Result<()> {{
initialize::handler(ctx)
pub fn initialize(context: Context<Initialize>) -> Result<()> {{
initialize::handler(context)
}}
}}
"#,
Expand Down Expand Up @@ -144,7 +145,8 @@ pub use initialize::*;
#[derive(Accounts)]
pub struct Initialize {}
pub fn handler(ctx: Context<Initialize>) -> Result<()> {
pub fn handler(context: Context<Initialize>) -> Result<()> {
msg!("Greetings from: {{:?}}", context.program_id);
Ok(())
}
"#
Expand Down

0 comments on commit ab629f9

Please sign in to comment.