Files
solana/programs/bpf/rust/param_passing_dep/src/lib.rs

27 lines
562 B
Rust
Raw Normal View History

//! @brief Example Rust-based BPF program tests loop iteration
#![no_std]
#![allow(unused_attributes)]
extern crate solana_sdk_bpf_utils;
pub struct Data<'a> {
pub twentyone: u64,
pub twentytwo: u64,
pub twentythree: u64,
pub twentyfour: u64,
pub twentyfive: u32,
pub array: &'a [u8],
}
pub struct TestDep {
pub thirty: u32,
}
impl<'a> TestDep {
pub fn new(data: &Data<'a>, _one: u64, _two: u64, _three: u64, _four: u64, five: u64) -> Self {
Self {
thirty: data.twentyfive + five as u32,
}
}
}