aboutsummaryrefslogtreecommitdiff
path: root/azalea-chat/src/component.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-08-10 18:55:23 -0500
committerGitHub <noreply@github.com>2025-08-10 18:55:23 -0500
commit7120842f9d2c659a2f12d8922299c2a761bc5582 (patch)
tree0d7976ceec82d914e4c75f23adcdd5839f9960a4 /azalea-chat/src/component.rs
parent3b659833c1ad4cca89b4cd553193edcb6d223163 (diff)
downloadazalea-drasl-7120842f9d2c659a2f12d8922299c2a761bc5582.tar.xz
Send correct data component checksums (#234)
* start implementing data component crc32 hashes * start doing serde impls for checksums * make more components hashable * make all data components serializable * support recursive components * fix simdnbt dep * update changelog * clippy
Diffstat (limited to 'azalea-chat/src/component.rs')
-rw-r--r--azalea-chat/src/component.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs
index 2a7e588e..e1652cf1 100644
--- a/azalea-chat/src/component.rs
+++ b/azalea-chat/src/component.rs
@@ -21,7 +21,7 @@ use crate::{
};
/// A chat component, basically anything you can see in chat.
-#[derive(Clone, Debug, PartialEq, Eq, Serialize, Hash)]
+#[derive(Clone, Debug, PartialEq, Serialize)]
#[serde(untagged)]
pub enum FormattedText {
Text(TextComponent),
@@ -348,7 +348,7 @@ impl<'de> Deserialize<'de> for FormattedText {
}
let style = Style::deserialize(&json);
- component.get_base_mut().style = style;
+ component.get_base_mut().style = Box::new(style);
return Ok(component);
}
@@ -539,7 +539,7 @@ impl FormattedText {
let base_style = Style::from_compound(compound).ok()?;
let new_style = &mut component.get_base_mut().style;
- *new_style = new_style.merged_with(&base_style);
+ *new_style = Box::new(new_style.merged_with(&base_style));
Some(component)
}