Skip to content

Commit dc3f250

Browse files
committed
Address review feedback
1 parent 289b585 commit dc3f250

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

program/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,10 @@ pub mod log;
502502
pub mod nonce;
503503
pub mod program;
504504
pub mod program_error;
505+
#[deprecated(
506+
since = "2.3.0",
507+
note = "Use `solana_bincode::limited_deserialize` instead"
508+
)]
505509
pub mod program_utils;
506510
pub mod secp256k1_program;
507511
pub mod slot_hashes;

sdk/src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ pub mod system_instruction {
126126
#[allow(deprecated)]
127127
pub use solana_program::system_instruction::*;
128128
}
129-
#[deprecated(since = "2.3.0", note = "Use `solana_sdk_ids::system_program` instead")]
129+
#[deprecated(
130+
since = "2.3.0",
131+
note = "Use `solana_system_interface::program` instead"
132+
)]
130133
pub mod system_program {
131134
#[allow(deprecated)]
132135
pub use solana_program::system_program::*;
@@ -372,7 +375,7 @@ pub mod exit {
372375
}
373376

374377
/// Convenience macro for `AddAssign` with saturating arithmetic.
375-
/// Replace by `std::num::Saturating` once stable
378+
#[deprecated(since = "2.3.0", note = "Use `std::num::Saturating` instead")]
376379
#[macro_export]
377380
macro_rules! saturating_add_assign {
378381
($i:expr, $v:expr) => {{
@@ -383,6 +386,7 @@ macro_rules! saturating_add_assign {
383386
pub extern crate bs58;
384387

385388
#[cfg(test)]
389+
#[allow(deprecated)]
386390
mod tests {
387391
#[test]
388392
fn test_saturating_add_assign() {

sdk/src/program_utils.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ use crate::instruction::InstructionError;
66

77
/// Deserialize with a limit based the maximum amount of data a program can expect to get.
88
/// This function should be used in place of direct deserialization to help prevent OOM errors
9+
#[deprecated(
10+
since = "2.3.0",
11+
note = "Use `solana_bincode::limited_deserialize` instead"
12+
)]
913
pub fn limited_deserialize<T>(instruction_data: &[u8]) -> Result<T, InstructionError>
1014
where
1115
T: serde::de::DeserializeOwned,
@@ -17,6 +21,7 @@ where
1721
}
1822

1923
#[cfg(test)]
24+
#[allow(deprecated)]
2025
pub mod tests {
2126
use super::*;
2227

sdk/src/rpc_port.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![deprecated(since = "2.3.0", note = "Use `solana_rpc_client_api::port` instead")]
12
//! RPC default port numbers.
23
34
/// Default port number for JSON RPC API

0 commit comments

Comments
 (0)