solana_borsh/
v0_10.rs

1#![allow(clippy::arithmetic_side_effects)]
2//! Utilities for the [borsh] serialization format, version 0.10.
3//!
4//! [borsh]: https://borsh.io/
5use {
6    crate::macros::{
7        impl_get_instance_packed_len, impl_get_packed_len_v0, impl_try_from_slice_unchecked,
8    },
9    borsh0_10::maybestd::io,
10};
11
12impl_get_packed_len_v0!(
13    borsh0_10,
14    #[deprecated(
15        since = "1.18.0",
16        note = "Please upgrade to Borsh 1.X and use `v1::get_packed_len` instead"
17    )]
18);
19impl_try_from_slice_unchecked!(
20    borsh0_10,
21    io,
22    #[deprecated(
23        since = "1.18.0",
24        note = "Please upgrade to Borsh 1.X and use `v1::try_from_slice_unchecked` instead"
25    )]
26);
27impl_get_instance_packed_len!(
28    borsh0_10,
29    io,
30    #[deprecated(
31        since = "1.18.0",
32        note = "Please upgrade to Borsh 1.X and use `v1::get_instance_packed_len` instead"
33    )]
34);
35
36#[cfg(test)]
37#[allow(deprecated)]
38mod tests {
39    use {crate::macros::impl_tests, borsh0_10::maybestd::io};
40    impl_tests!(borsh0_10, io);
41}