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