From df9627e952a3d2b50f5322bdf140ae62e8ec2288 Mon Sep 17 00:00:00 2001 From: Jesse Eisses Date: Thu, 30 Jun 2022 15:36:38 +0200 Subject: [PATCH] update docs on format of method dispatch identifier (#2017) --- lang/src/lib.rs | 2 +- lang/syn/src/codegen/program/dispatch.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/src/lib.rs b/lang/src/lib.rs index 52d0f3ced..b269fe229 100644 --- a/lang/src/lib.rs +++ b/lang/src/lib.rs @@ -178,7 +178,7 @@ pub trait AccountDeserialize: Sized { pub trait ZeroCopy: Discriminator + Copy + Clone + Zeroable + Pod {} /// Calculates the data for an instruction invocation, where the data is -/// `Sha256(::)[..8] || BorshSerialize(args)`. +/// `Sha256(:)[..8] || BorshSerialize(args)`. /// `args` is a borsh serialized struct of named fields for each argument given /// to an instruction. pub trait InstructionData: AnchorSerialize { diff --git a/lang/syn/src/codegen/program/dispatch.rs b/lang/syn/src/codegen/program/dispatch.rs index d80232662..6d898c2a8 100644 --- a/lang/syn/src/codegen/program/dispatch.rs +++ b/lang/syn/src/codegen/program/dispatch.rs @@ -124,7 +124,7 @@ pub fn generate(program: &Program) -> proc_macro2::TokenStream { /// two pieces can be combined to creater a method identifier, /// specifically, Anchor uses /// - /// Sha256("::")[..8], + /// Sha256(":")[..8], /// /// where the namespace can be one of three types. 1) "global" for a /// regular instruction, 2) "state" for a state struct instruction