diff options
Diffstat (limited to 'azalea-chat/src/component.rs')
| -rw-r--r-- | azalea-chat/src/component.rs | 6 |
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) } |
