Skip to content

Commit c9a02c0

Browse files
authored
sdk: Remove support for borsh 0.9 (#1440)
1 parent 76f7c79 commit c9a02c0

6 files changed

Lines changed: 14 additions & 134 deletions

File tree

Cargo.lock

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

programs/sbf/Cargo.lock

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

sdk/program/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ bincode = { workspace = true }
1616
blake3 = { workspace = true, features = ["digest", "traits-preview"] }
1717
borsh = { workspace = true }
1818
borsh0-10 = { package = "borsh", version = "0.10.3" }
19-
borsh0-9 = { package = "borsh", version = "0.9.3" }
2019
bs58 = { workspace = true }
2120
bv = { workspace = true, features = ["serde"] }
2221
bytemuck = { workspace = true, features = ["derive"] }

sdk/program/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,6 @@ pub mod big_mod_exp;
477477
pub mod blake3;
478478
pub mod borsh;
479479
pub mod borsh0_10;
480-
pub mod borsh0_9;
481480
pub mod borsh1;
482481
pub mod bpf_loader;
483482
pub mod bpf_loader_deprecated;

sdk/program/src/pubkey.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -684,11 +684,6 @@ impl borsh0_10::de::BorshDeserialize for Pubkey {
684684
)?))
685685
}
686686
}
687-
impl borsh0_9::de::BorshDeserialize for Pubkey {
688-
fn deserialize(buf: &mut &[u8]) -> ::core::result::Result<Self, borsh0_9::maybestd::io::Error> {
689-
Ok(Self(borsh0_9::BorshDeserialize::deserialize(buf)?))
690-
}
691-
}
692687

693688
macro_rules! impl_borsh_schema {
694689
($borsh:ident) => {
@@ -722,7 +717,6 @@ macro_rules! impl_borsh_schema {
722717
};
723718
}
724719
impl_borsh_schema!(borsh0_10);
725-
impl_borsh_schema!(borsh0_9);
726720

727721
macro_rules! impl_borsh_serialize {
728722
($borsh:ident) => {
@@ -738,7 +732,6 @@ macro_rules! impl_borsh_serialize {
738732
};
739733
}
740734
impl_borsh_serialize!(borsh0_10);
741-
impl_borsh_serialize!(borsh0_9);
742735

743736
#[cfg(test)]
744737
mod tests {

sdk/src/lib.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,16 @@ pub use solana_program::program_stubs;
4242
// These solana_program imports could be *-imported, but that causes a bunch of
4343
// confusing duplication in the docs due to a rustdoc bug. #26211
4444
pub use solana_program::{
45-
account_info, address_lookup_table, alt_bn128, big_mod_exp, blake3, borsh, borsh0_10, borsh0_9,
46-
borsh1, bpf_loader, bpf_loader_deprecated, bpf_loader_upgradeable, clock, config,
47-
custom_heap_default, custom_panic_default, debug_account_data, declare_deprecated_sysvar_id,
48-
declare_sysvar_id, decode_error, ed25519_program, epoch_rewards, epoch_schedule,
49-
fee_calculator, impl_sysvar_get, incinerator, instruction, keccak, lamports,
50-
loader_instruction, loader_upgradeable_instruction, loader_v4, loader_v4_instruction, message,
51-
msg, native_token, nonce, poseidon, program, program_error, program_memory, program_option,
52-
program_pack, rent, sanitize, secp256k1_program, secp256k1_recover, serde_varint,
53-
serialize_utils, short_vec, slot_hashes, slot_history, stable_layout, stake, stake_history,
54-
syscalls, system_instruction, system_program, sysvar, unchecked_div_by_const, vote,
55-
wasm_bindgen,
45+
account_info, address_lookup_table, alt_bn128, big_mod_exp, blake3, borsh, borsh0_10, borsh1,
46+
bpf_loader, bpf_loader_deprecated, bpf_loader_upgradeable, clock, config, custom_heap_default,
47+
custom_panic_default, debug_account_data, declare_deprecated_sysvar_id, declare_sysvar_id,
48+
decode_error, ed25519_program, epoch_rewards, epoch_schedule, fee_calculator, impl_sysvar_get,
49+
incinerator, instruction, keccak, lamports, loader_instruction, loader_upgradeable_instruction,
50+
loader_v4, loader_v4_instruction, message, msg, native_token, nonce, poseidon, program,
51+
program_error, program_memory, program_option, program_pack, rent, sanitize, secp256k1_program,
52+
secp256k1_recover, serde_varint, serialize_utils, short_vec, slot_hashes, slot_history,
53+
stable_layout, stake, stake_history, syscalls, system_instruction, system_program, sysvar,
54+
unchecked_div_by_const, vote, wasm_bindgen,
5655
};
5756
#[allow(deprecated)]
5857
pub use solana_program::{address_lookup_table_account, sdk_ids};

0 commit comments

Comments
 (0)