mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
update simdnbt
This commit is contained in:
parent
d5a281bf15
commit
2992fc6b47
2 changed files with 269 additions and 290 deletions
555
Cargo.lock
generated
555
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -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())),
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue