diff options
Diffstat (limited to 'azalea-buf')
| -rwxr-xr-x | azalea-buf/src/read.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-buf/src/read.rs b/azalea-buf/src/read.rs index d5961c78..882e2bce 100755 --- a/azalea-buf/src/read.rs +++ b/azalea-buf/src/read.rs @@ -344,13 +344,13 @@ impl<T: McBufReadable, const N: usize> McBufReadable for [T; N] { impl McBufReadable for simdnbt::owned::NbtTag { fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { - Ok(simdnbt::owned::read_tag(buf)?) + Ok(simdnbt::owned::read_tag(buf).map_err(simdnbt::Error::from)?) } } impl McBufReadable for simdnbt::owned::NbtCompound { fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { - match simdnbt::owned::read_tag(buf)? { + match simdnbt::owned::read_tag(buf).map_err(simdnbt::Error::from)? { simdnbt::owned::NbtTag::Compound(compound) => Ok(compound), _ => Err(BufReadError::Custom("Expected compound tag".to_string())), } |
