Skip to content

Commit

Permalink
rustfmt and clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ravyu-jump committed Oct 8, 2024
1 parent 0e6a65d commit 8edbe10
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/utils/err_map.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use crate::proto::ErrKind;
use solana_bpf_loader_program::syscalls::SyscallError;
use solana_program_runtime::{
invoke_context::InvokeContext,
solana_rbpf::error::{EbpfError, StableResult},
stable_log,
};
use solana_sdk::{instruction::InstructionError, pubkey::Pubkey};
use crate::proto::ErrKind;

// Important!
// The error mapping in this file should be kept aligned with Firedancer.
Expand Down
3 changes: 2 additions & 1 deletion src/vm_cpi_syscall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ fn execute_vm_cpi_syscall(input: SyscallContext) -> Option<SyscallEffects> {
// Unwrap and return the effects of the syscall
let program_result = vm.program_result;
let program_id = instr_ctx.instruction.program_id;
let (error, error_kind, r0) = unpack_stable_result(program_result, &vm.context_object_pointer, &program_id);
let (error, error_kind, r0) =
unpack_stable_result(program_result, vm.context_object_pointer, &program_id);
Some(SyscallEffects {
// Register 0 doesn't seem to contain the result, maybe we're missing some code from agave.
// Regardless, the result is available in vm.program_result, so we can return it from there.
Expand Down
3 changes: 2 additions & 1 deletion src/vm_syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ fn execute_vm_syscall(input: SyscallContext) -> Option<SyscallEffects> {
// Unwrap and return the effects of the syscall
let program_id = instr_ctx.instruction.program_id;
let program_result = vm.program_result;
let (error, error_kind, r0) = unpack_stable_result(program_result, &vm.context_object_pointer, &program_id);
let (error, error_kind, r0) =
unpack_stable_result(program_result, vm.context_object_pointer, &program_id);
Some(SyscallEffects {
// Register 0 doesn't seem to contain the result, maybe we're missing some code from agave.
// Regardless, the result is available in vm.program_result, so we can return it from there.
Expand Down

0 comments on commit 8edbe10

Please sign in to comment.