lang: Remove mut from dispatch arg (#387)

This commit is contained in:
Armani Ferrante 2021-06-15 17:19:13 -07:00 committed by GitHub
parent a6ebaabac4
commit b3b33f63f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ pub fn generate(program: &Program) -> proc_macro2::TokenStream {
/// With this 8 byte identifier, Anchor performs method dispatch, /// With this 8 byte identifier, Anchor performs method dispatch,
/// matching the given 8 byte identifier to the associated method /// matching the given 8 byte identifier to the associated method
/// handler, which leads to user defined code being eventually invoked. /// handler, which leads to user defined code being eventually invoked.
fn dispatch(program_id: &Pubkey, accounts: &[AccountInfo], sighash: [u8; 8], mut ix_data: &[u8]) -> ProgramResult { fn dispatch(program_id: &Pubkey, accounts: &[AccountInfo], sighash: [u8; 8], ix_data: &[u8]) -> ProgramResult {
// If the method identifier is the IDL tag, then execute an IDL // If the method identifier is the IDL tag, then execute an IDL
// instruction, injected into all Anchor programs. // instruction, injected into all Anchor programs.
if cfg!(not(feature = "no-idl")) { if cfg!(not(feature = "no-idl")) {