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

sdk: Remove support for borsh 0.9 #1440

Merged
merged 1 commit into from
May 21, 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
59 changes: 2 additions & 57 deletions Cargo.lock

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

59 changes: 2 additions & 57 deletions programs/sbf/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 sdk/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ bincode = { workspace = true }
blake3 = { workspace = true, features = ["digest", "traits-preview"] }
borsh = { workspace = true }
borsh0-10 = { package = "borsh", version = "0.10.3" }
borsh0-9 = { package = "borsh", version = "0.9.3" }
bs58 = { workspace = true }
bv = { workspace = true, features = ["serde"] }
bytemuck = { workspace = true, features = ["derive"] }
Expand Down
1 change: 0 additions & 1 deletion sdk/program/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,6 @@ pub mod big_mod_exp;
pub mod blake3;
pub mod borsh;
pub mod borsh0_10;
pub mod borsh0_9;
pub mod borsh1;
pub mod bpf_loader;
pub mod bpf_loader_deprecated;
Expand Down
7 changes: 0 additions & 7 deletions sdk/program/src/pubkey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -684,11 +684,6 @@ impl borsh0_10::de::BorshDeserialize for Pubkey {
)?))
}
}
impl borsh0_9::de::BorshDeserialize for Pubkey {
fn deserialize(buf: &mut &[u8]) -> ::core::result::Result<Self, borsh0_9::maybestd::io::Error> {
Ok(Self(borsh0_9::BorshDeserialize::deserialize(buf)?))
}
}

macro_rules! impl_borsh_schema {
($borsh:ident) => {
Expand Down Expand Up @@ -722,7 +717,6 @@ macro_rules! impl_borsh_schema {
};
}
impl_borsh_schema!(borsh0_10);
impl_borsh_schema!(borsh0_9);

macro_rules! impl_borsh_serialize {
($borsh:ident) => {
Expand All @@ -738,7 +732,6 @@ macro_rules! impl_borsh_serialize {
};
}
impl_borsh_serialize!(borsh0_10);
impl_borsh_serialize!(borsh0_9);

#[cfg(test)]
mod tests {
Expand Down
21 changes: 10 additions & 11 deletions sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,16 @@ pub use solana_program::program_stubs;
// These solana_program imports could be *-imported, but that causes a bunch of
// confusing duplication in the docs due to a rustdoc bug. #26211
pub use solana_program::{
account_info, address_lookup_table, alt_bn128, big_mod_exp, blake3, borsh, borsh0_10, borsh0_9,
borsh1, bpf_loader, bpf_loader_deprecated, bpf_loader_upgradeable, clock, config,
custom_heap_default, custom_panic_default, debug_account_data, declare_deprecated_sysvar_id,
declare_sysvar_id, decode_error, ed25519_program, epoch_rewards, epoch_schedule,
fee_calculator, impl_sysvar_get, incinerator, instruction, keccak, lamports,
loader_instruction, loader_upgradeable_instruction, loader_v4, loader_v4_instruction, message,
msg, native_token, nonce, poseidon, program, program_error, program_memory, program_option,
program_pack, rent, sanitize, secp256k1_program, secp256k1_recover, serde_varint,
serialize_utils, short_vec, slot_hashes, slot_history, stable_layout, stake, stake_history,
syscalls, system_instruction, system_program, sysvar, unchecked_div_by_const, vote,
wasm_bindgen,
account_info, address_lookup_table, alt_bn128, big_mod_exp, blake3, borsh, borsh0_10, borsh1,
bpf_loader, bpf_loader_deprecated, bpf_loader_upgradeable, clock, config, custom_heap_default,
custom_panic_default, debug_account_data, declare_deprecated_sysvar_id, declare_sysvar_id,
decode_error, ed25519_program, epoch_rewards, epoch_schedule, fee_calculator, impl_sysvar_get,
incinerator, instruction, keccak, lamports, loader_instruction, loader_upgradeable_instruction,
loader_v4, loader_v4_instruction, message, msg, native_token, nonce, poseidon, program,
program_error, program_memory, program_option, program_pack, rent, sanitize, secp256k1_program,
secp256k1_recover, serde_varint, serialize_utils, short_vec, slot_hashes, slot_history,
stable_layout, stake, stake_history, syscalls, system_instruction, system_program, sysvar,
unchecked_div_by_const, vote, wasm_bindgen,
};
#[allow(deprecated)]
pub use solana_program::{address_lookup_table_account, sdk_ids};
Expand Down
Loading