Skip to content

Commit 3821e81

Browse files
authored
program: drop unused errors (#41)
1 parent 23ff1ca commit 3821e81

File tree

5 files changed

+3
-57
lines changed

5 files changed

+3
-57
lines changed

Cargo.lock

Lines changed: 0 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

program/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ serde = { version = "1.0.193", features = ["derive"] }
2323
solana-frozen-abi = { version = "2.0.1", optional = true }
2424
solana-frozen-abi-macro = { version = "2.0.1", optional = true }
2525
solana-program = "2.0.1"
26-
spl-program-error = "0.5.0"
2726

2827
[dev-dependencies]
2928
mollusk-svm = { version = "0.0.5", features = ["fuzz"] }

program/src/entrypoint.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
//! Program entrypoint
22
33
use {
4-
crate::{error::AddressLookupError, processor},
5-
solana_program::{
6-
account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError,
7-
pubkey::Pubkey,
8-
},
4+
crate::processor,
5+
solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey},
96
};
107

118
solana_program::entrypoint!(process_instruction);
@@ -14,9 +11,5 @@ fn process_instruction(
1411
accounts: &[AccountInfo],
1512
instruction_data: &[u8],
1613
) -> ProgramResult {
17-
if let Err(error) = processor::process(program_id, accounts, instruction_data) {
18-
error.print::<AddressLookupError>();
19-
return Err(error);
20-
}
21-
Ok(())
14+
processor::process(program_id, accounts, instruction_data)
2215
}

program/src/error.rs

Lines changed: 0 additions & 19 deletions
This file was deleted.

program/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#[cfg(all(target_os = "solana", feature = "bpf-entrypoint"))]
55
mod entrypoint;
6-
pub mod error;
76
pub mod instruction;
87
pub mod processor;
98
pub mod state;

0 commit comments

Comments
 (0)