Skip to content

Commit

Permalink
chore!: completely remove deprecated BorshSerialize::try_to_vec (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
dj8yfo committed Oct 2, 2023
1 parent bb5248e commit 57f9c25
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions borsh/src/ser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ const FLOAT_NAN_ERR: &str = "For portability reasons we do not allow to serializ
pub trait BorshSerialize {
fn serialize<W: Write>(&self, writer: &mut W) -> Result<()>;

/// Serialize this instance into a vector of bytes.
#[deprecated = "use `borsh::to_vec(&object)` instead"]
fn try_to_vec(&self) -> Result<Vec<u8>> {
let mut result = Vec::with_capacity(helpers::DEFAULT_SERIALIZER_CAPACITY);
self.serialize(&mut result)?;
Ok(result)
}

#[inline]
#[doc(hidden)]
fn u8_slice(slice: &[Self]) -> Option<&[u8]>
Expand Down

0 comments on commit 57f9c25

Please sign in to comment.