This commit is contained in:
Michael Vines
2020-12-13 17:26:34 -08:00
parent 0d139d7ef3
commit 7143aaa89b
102 changed files with 543 additions and 499 deletions

View File

@@ -19,7 +19,7 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 {
assert_eq!(z, 340_282_366_920_938_463_463_374_607_431_768_211_454);
assert_eq!(u128::from(1u32.to_le()), 1);
assert_eq!(u128::from(1u32.to_be()), 0x1_000_000);
assert_eq!(u128::from(1u32.to_be()), 0x0100_0000);
assert_eq!(solana_bpf_rust_128bit_dep::uadd(10, 20), 30u128);
assert_eq!(solana_bpf_rust_128bit_dep::usubtract(30, 20), 10u128);

View File

@@ -53,7 +53,8 @@ unsafe impl std::alloc::GlobalAlloc for BumpAllocator {
static A: BumpAllocator = BumpAllocator;
entrypoint!(process_instruction);
fn process_instruction(
#[allow(clippy::unnecessary_wraps)]
pub fn process_instruction(
_program_id: &Pubkey,
_accounts: &[AccountInfo],
_instruction_data: &[u8],

View File

@@ -27,6 +27,7 @@ fn custom_panic(info: &core::panic::PanicInfo<'_>) {
}
entrypoint_deprecated!(process_instruction);
#[allow(clippy::unnecessary_wraps)]
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],

View File

@@ -6,6 +6,7 @@ use solana_program::{
};
entrypoint!(process_instruction);
#[allow(clippy::unnecessary_wraps)]
fn process_instruction(
_program_id: &Pubkey,
accounts: &[AccountInfo],

View File

@@ -7,6 +7,7 @@ use solana_program::{
};
entrypoint!(process_instruction);
#[allow(clippy::unnecessary_wraps)]
fn process_instruction(
_program_id: &Pubkey,
accounts: &[AccountInfo],

View File

@@ -6,6 +6,7 @@ use solana_program::{
};
entrypoint!(process_instruction);
#[allow(clippy::unnecessary_wraps)]
fn process_instruction(
_program_id: &Pubkey,
_accounts: &[AccountInfo],

View File

@@ -14,6 +14,7 @@ use solana_program::{
};
entrypoint!(process_instruction);
#[allow(clippy::unnecessary_wraps)]
fn process_instruction(
_program_id: &Pubkey,
_accounts: &[AccountInfo],

View File

@@ -8,6 +8,7 @@ use solana_program::{
};
entrypoint!(process_instruction);
#[allow(clippy::unnecessary_wraps)]
fn process_instruction(
_program_id: &Pubkey,
_accounts: &[AccountInfo],

View File

@@ -21,6 +21,7 @@ fn return_sstruct() -> SStruct {
}
entrypoint!(process_instruction);
#[allow(clippy::unnecessary_wraps)]
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],

View File

@@ -3,6 +3,7 @@ use solana_program::{
};
entrypoint!(process_instruction);
#[allow(clippy::unnecessary_wraps)]
fn process_instruction(
_program_id: &Pubkey,
accounts: &[AccountInfo],

View File

@@ -16,6 +16,7 @@ use solana_program::{
};
entrypoint!(process_instruction);
#[allow(clippy::unnecessary_wraps)]
fn process_instruction(
_program_id: &Pubkey,
accounts: &[AccountInfo],