miraland_program/
borsh0_9.rs

1#![allow(clippy::arithmetic_side_effects)]
2//! Utilities for the [borsh] serialization format, version 0.9.
3//!
4//! This file is provided for backwards compatibility with types that still use
5//! borsh 0.9, even though this crate canonically uses borsh 0.10.
6//!
7//! [borsh]: https://borsh.io/
8use {
9    crate::borsh::{
10        impl_get_instance_packed_len, impl_get_packed_len_v0, impl_try_from_slice_unchecked,
11    },
12    borsh0_9::maybestd::io,
13};
14
15impl_get_packed_len_v0!(
16    borsh0_9,
17    #[deprecated(
18        since = "1.17.0",
19        note = "Please upgrade to Borsh 1.X and use `borsh1::get_packed_len` instead"
20    )]
21);
22impl_try_from_slice_unchecked!(
23    borsh0_9,
24    io,
25    #[deprecated(
26        since = "1.17.0",
27        note = "Please upgrade to Borsh 1.X and use `borsh1::try_from_slice_unchecked` instead"
28    )]
29);
30impl_get_instance_packed_len!(
31    borsh0_9,
32    io,
33    #[deprecated(
34        since = "1.17.0",
35        note = "Please upgrade to Borsh 1.X and use `borsh1::get_instance_packed_len` instead"
36    )]
37);
38
39#[cfg(test)]
40#[allow(deprecated)]
41mod tests {
42    use {crate::borsh::impl_tests, borsh0_9::maybestd::io};
43    impl_tests!(borsh0_9, io);
44}