diff options
| author | veronoicc <64193056+veronoicc@users.noreply.github.com> | 2024-05-14 23:59:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-14 16:59:36 -0500 |
| commit | 892869ad1249e238eb9228d57bd9884793a9fe75 (patch) | |
| tree | 57d6bdc810b6d5989fbdc6a9ed171c2fd51b5455 /azalea-chat/src | |
| parent | b00106b7ff18c2d1fc5b751227616f5bf1f3495c (diff) | |
| download | azalea-drasl-892869ad1249e238eb9228d57bd9884793a9fe75.tar.xz | |
Update simdnbt dep (#148)
* Update simdnbt dep
* Fix not compiling (rust analyzer is still yapping, i trust you cargo check)
* Update simdnbt to 0.5.2
* finally everything works :prayge:
Diffstat (limited to 'azalea-chat/src')
| -rwxr-xr-x | azalea-chat/src/component.rs | 3 | ||||
| -rw-r--r-- | azalea-chat/src/numbers.rs | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs index 01c3a370..94d653e8 100755 --- a/azalea-chat/src/component.rs +++ b/azalea-chat/src/component.rs @@ -470,8 +470,7 @@ impl simdnbt::FromNbtTag for FormattedText { #[cfg(feature = "azalea-buf")] impl McBufReadable for FormattedText { fn read_from(buf: &mut std::io::Cursor<&[u8]>) -> Result<Self, BufReadError> { - let alloc = Default::default(); - let nbt = simdnbt::borrow::NbtTag::read_optional(buf, &alloc)?; + let nbt = simdnbt::borrow::read_optional_tag(buf)?; if let Some(nbt) = nbt { FormattedText::from_nbt_tag(&nbt).ok_or(BufReadError::Custom( "couldn't convert nbt to chat message".to_owned(), diff --git a/azalea-chat/src/numbers.rs b/azalea-chat/src/numbers.rs index 21c30591..a5a88c4f 100644 --- a/azalea-chat/src/numbers.rs +++ b/azalea-chat/src/numbers.rs @@ -24,7 +24,7 @@ impl McBufReadable for NumberFormat { match kind { NumberFormatKind::Blank => Ok(NumberFormat::Blank), NumberFormatKind::Styled => Ok(NumberFormat::Styled { - style: Nbt::read(buf)?, + style: simdnbt::owned::read(buf)?, }), NumberFormatKind::Fixed => Ok(NumberFormat::Fixed { value: FormattedText::read_from(buf)?, |
