Browse Source

cli: Fix unused variable warning on new projects (#2930)

Mike MacCana 1 year ago
parent
commit
499e1e67c6
1 changed files with 2 additions and 0 deletions
  1. 2 0
      cli/src/rust_template.rs

+ 2 - 0
cli/src/rust_template.rs

@@ -62,6 +62,7 @@ pub mod {} {{
     use super::*;
 
     pub fn initialize(ctx: Context<Initialize>) -> Result<()> {{
+        msg!("Greetings from: {{:?}}", ctx.program_id);
         Ok(())
     }}
 }}
@@ -145,6 +146,7 @@ pub use initialize::*;
 pub struct Initialize {}
 
 pub fn handler(ctx: Context<Initialize>) -> Result<()> {
+    msg!("Greetings from: {{:?}}", ctx.program_id);
     Ok(())
 }
 "#