aboutsummaryrefslogtreecommitdiff
path: root/azalea-chat/src/component.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-10-30 19:50:37 +0100
committermat <git@matdoes.dev>2025-10-30 19:50:37 +0100
commit7d0c7553fd5a0210285a51a65c10f898f641a0cc (patch)
tree2bfc5747c55622082761f7d6e3cabf86ed8ae2e4 /azalea-chat/src/component.rs
parent03a496fc7d952b1136cb717f2e8d1ccfb798ee64 (diff)
downloadazalea-drasl-7d0c7553fd5a0210285a51a65c10f898f641a0cc.tar.xz
Remove unnecessary MoveEntityError and MovePlayerError types and other cleanup
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)
}