Skip to content

Commit

Permalink
program: drop unused errors (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec authored Nov 7, 2024
1 parent 23ff1ca commit 3821e81
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 57 deletions.
26 changes: 0 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ serde = { version = "1.0.193", features = ["derive"] }
solana-frozen-abi = { version = "2.0.1", optional = true }
solana-frozen-abi-macro = { version = "2.0.1", optional = true }
solana-program = "2.0.1"
spl-program-error = "0.5.0"

[dev-dependencies]
mollusk-svm = { version = "0.0.5", features = ["fuzz"] }
Expand Down
13 changes: 3 additions & 10 deletions program/src/entrypoint.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
//! Program entrypoint
use {
crate::{error::AddressLookupError, processor},
solana_program::{
account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError,
pubkey::Pubkey,
},
crate::processor,
solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey},
};

solana_program::entrypoint!(process_instruction);
Expand All @@ -14,9 +11,5 @@ fn process_instruction(
accounts: &[AccountInfo],
instruction_data: &[u8],
) -> ProgramResult {
if let Err(error) = processor::process(program_id, accounts, instruction_data) {
error.print::<AddressLookupError>();
return Err(error);
}
Ok(())
processor::process(program_id, accounts, instruction_data)
}
19 changes: 0 additions & 19 deletions program/src/error.rs

This file was deleted.

1 change: 0 additions & 1 deletion program/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#[cfg(all(target_os = "solana", feature = "bpf-entrypoint"))]
mod entrypoint;
pub mod error;
pub mod instruction;
pub mod processor;
pub mod state;
Expand Down

0 comments on commit 3821e81

Please sign in to comment.