Drop lifetimes
This commit is contained in:
parent
8dd09c7530
commit
2b5e9d1286
|
@ -1,18 +1,17 @@
|
|||
//! Program entrypoint
|
||||
|
||||
use solana_program::{
|
||||
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, info,
|
||||
program_error::ProgramError, pubkey::Pubkey,
|
||||
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, program_error::ProgramError,
|
||||
pubkey::Pubkey,
|
||||
};
|
||||
use std::str::from_utf8;
|
||||
|
||||
entrypoint!(process_instruction);
|
||||
fn process_instruction<'a>(
|
||||
fn process_instruction(
|
||||
_program_id: &Pubkey,
|
||||
_accounts: &'a [AccountInfo<'a>],
|
||||
_accounts: &[AccountInfo],
|
||||
instruction_data: &[u8],
|
||||
) -> ProgramResult {
|
||||
info!("hi");
|
||||
from_utf8(instruction_data).map_err(|_| ProgramError::InvalidInstructionData)?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -7,9 +7,9 @@ use solana_program::{
|
|||
};
|
||||
|
||||
entrypoint!(process_instruction);
|
||||
fn process_instruction<'a>(
|
||||
fn process_instruction(
|
||||
program_id: &Pubkey,
|
||||
accounts: &'a [AccountInfo<'a>],
|
||||
accounts: &[AccountInfo],
|
||||
instruction_data: &[u8],
|
||||
) -> ProgramResult {
|
||||
if let Err(error) = Processor::process(program_id, accounts, instruction_data) {
|
||||
|
|
|
@ -5,9 +5,9 @@ use solana_program::{
|
|||
};
|
||||
|
||||
entrypoint!(process_instruction);
|
||||
fn process_instruction<'a>(
|
||||
fn process_instruction(
|
||||
program_id: &Pubkey,
|
||||
accounts: &'a [AccountInfo<'a>],
|
||||
accounts: &[AccountInfo],
|
||||
instruction_data: &[u8],
|
||||
) -> ProgramResult {
|
||||
crate::processor::process_instruction(program_id, accounts, instruction_data)?;
|
||||
|
|
|
@ -88,9 +88,9 @@ fn process_request_payment(
|
|||
}
|
||||
|
||||
/// Process the given transaction instruction
|
||||
pub fn process_instruction<'a>(
|
||||
pub fn process_instruction(
|
||||
_program_id: &Pubkey,
|
||||
account_infos: &'a [AccountInfo<'a>],
|
||||
account_infos: &[AccountInfo],
|
||||
input: &[u8],
|
||||
) -> Result<(), ProgramError> {
|
||||
let account_infos_iter = &mut account_infos.iter();
|
||||
|
|
|
@ -7,9 +7,9 @@ use solana_program::{
|
|||
};
|
||||
|
||||
entrypoint!(process_instruction);
|
||||
fn process_instruction<'a>(
|
||||
fn process_instruction(
|
||||
program_id: &Pubkey,
|
||||
accounts: &'a [AccountInfo<'a>],
|
||||
accounts: &[AccountInfo],
|
||||
instruction_data: &[u8],
|
||||
) -> ProgramResult {
|
||||
if let Err(error) = Processor::process(program_id, accounts, instruction_data) {
|
||||
|
|
|
@ -7,9 +7,9 @@ use solana_program::{
|
|||
};
|
||||
|
||||
entrypoint!(process_instruction);
|
||||
fn process_instruction<'a>(
|
||||
fn process_instruction(
|
||||
program_id: &Pubkey,
|
||||
accounts: &'a [AccountInfo<'a>],
|
||||
accounts: &[AccountInfo],
|
||||
instruction_data: &[u8],
|
||||
) -> ProgramResult {
|
||||
if let Err(error) = Processor::process(program_id, accounts, instruction_data) {
|
||||
|
|
|
@ -7,9 +7,9 @@ use solana_program::{
|
|||
};
|
||||
|
||||
entrypoint!(process_instruction);
|
||||
fn process_instruction<'a>(
|
||||
fn process_instruction(
|
||||
program_id: &Pubkey,
|
||||
accounts: &'a [AccountInfo<'a>],
|
||||
accounts: &[AccountInfo],
|
||||
instruction_data: &[u8],
|
||||
) -> ProgramResult {
|
||||
if let Err(error) = Processor::process(program_id, accounts, instruction_data) {
|
||||
|
|
Loading…
Reference in New Issue