aboutsummaryrefslogtreecommitdiff
path: root/azalea-chat/src/component.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-chat/src/component.rs')
-rw-r--r--azalea-chat/src/component.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs
index 30b0ed9d..be95638d 100644
--- a/azalea-chat/src/component.rs
+++ b/azalea-chat/src/component.rs
@@ -385,7 +385,7 @@ impl<'de> Deserialize<'de> for FormattedText {
}
let style = Style::deserialize(&json);
- component.get_base_mut().style = Box::new(style);
+ *component.get_base_mut().style = style;
return Ok(component);
}
@@ -601,7 +601,7 @@ impl FormattedText {
let base_style = Style::from_compound(compound).ok()?;
let new_style = &mut component.get_base_mut().style;
- *new_style = Box::new(new_style.merged_with(&base_style));
+ **new_style = new_style.merged_with(&base_style);
Some(component)
}