aboutsummaryrefslogtreecommitdiff
path: root/azalea-chat/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-chat/src')
-rwxr-xr-xazalea-chat/src/component.rs3
-rw-r--r--azalea-chat/src/numbers.rs2
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)?,