pub fn try_from_slice_unchecked<T>(data: &[u8]) -> Result<T, Error>
where T: BorshDeserialize,
👎Deprecated since 1.17.0: Please upgrade to Borsh 1.X and use borsh1::try_from_slice_unchecked instead
Expand description

Deserializes without checking that the entire slice has been consumed

Normally, try_from_slice checks the length of the final slice to ensure that the deserialization uses up all of the bytes in the slice.

Note that there is a potential issue with this function. Any buffer greater than or equal to the expected size will properly deserialize. For example, if the user passes a buffer destined for a different type, the error won’t get caught as easily.