Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

program: drop unused errors #41

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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