Use non-deprecated 'rmp_serde::from_slice'.

This commit is contained in:
Sergio Benitez 2022-04-19 13:20:44 -07:00
parent bc2315943b
commit 38bd5663c2
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ impl<T> DerefMut for MsgPack<T> {
pub fn from_slice<'a, T>(v: &'a [u8]) -> Result<T, Error>
where T: Deserialize<'a>,
{
rmp_serde::from_read_ref(v)
rmp_serde::from_slice(v)
}
/// Serialize a `T` into a MessagePack byte vector with compact representation.