diff options
| author | mat <git@matdoes.dev> | 2024-05-14 09:13:22 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-05-14 09:13:34 +0000 |
| commit | b00106b7ff18c2d1fc5b751227616f5bf1f3495c (patch) | |
| tree | 3329ea18252df21af544546d71c333946e846bb1 /azalea-chat/src | |
| parent | 8138d388e7126df28cb9e12d102d05f9060aaa31 (diff) | |
| download | azalea-drasl-b00106b7ff18c2d1fc5b751227616f5bf1f3495c.tar.xz | |
update simdnbt
Diffstat (limited to 'azalea-chat/src')
| -rwxr-xr-x | azalea-chat/src/component.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs index 55fbd30d..01c3a370 100755 --- a/azalea-chat/src/component.rs +++ b/azalea-chat/src/component.rs @@ -312,12 +312,12 @@ impl simdnbt::FromNbtTag for FormattedText { match with.list()? { simdnbt::borrow::NbtList::Empty => {} simdnbt::borrow::NbtList::String(with) => { - for item in with { + for item in *with { with_array.push(StringOrComponent::String(item.to_string())); } } simdnbt::borrow::NbtList::Compound(with) => { - for item in with { + for item in *with { // if it's a string component with no styling and no siblings, // just add a string to // with_array otherwise add the @@ -470,7 +470,8 @@ 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 nbt = simdnbt::borrow::NbtTag::read_optional(buf)?; + let alloc = Default::default(); + let nbt = simdnbt::borrow::NbtTag::read_optional(buf, &alloc)?; if let Some(nbt) = nbt { FormattedText::from_nbt_tag(&nbt).ok_or(BufReadError::Custom( "couldn't convert nbt to chat message".to_owned(), |
