Drop lifetimes

This commit is contained in:
Michael Vines 2020-11-01 00:22:04 -07:00
parent 8dd09c7530
commit 2b5e9d1286
7 changed files with 16 additions and 17 deletions

View File

@ -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(())
}

View File

@ -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) {

View File

@ -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)?;

View File

@ -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();

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {