diff options
| author | mat <git@matdoes.dev> | 2025-10-30 19:50:37 +0100 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-10-30 19:50:37 +0100 |
| commit | 7d0c7553fd5a0210285a51a65c10f898f641a0cc (patch) | |
| tree | 2bfc5747c55622082761f7d6e3cabf86ed8ae2e4 /azalea-chat/src | |
| parent | 03a496fc7d952b1136cb717f2e8d1ccfb798ee64 (diff) | |
| download | azalea-drasl-7d0c7553fd5a0210285a51a65c10f898f641a0cc.tar.xz | |
Remove unnecessary MoveEntityError and MovePlayerError types and other cleanup
Diffstat (limited to 'azalea-chat/src')
| -rw-r--r-- | azalea-chat/src/component.rs | 4 | ||||
| -rw-r--r-- | azalea-chat/src/text_component.rs | 2 |
2 files changed, 3 insertions, 3 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) } diff --git a/azalea-chat/src/text_component.rs b/azalea-chat/src/text_component.rs index 0fa0cd6f..c21e2d46 100644 --- a/azalea-chat/src/text_component.rs +++ b/azalea-chat/src/text_component.rs @@ -146,7 +146,7 @@ impl TextComponent { FormattedText::Text(self) } pub fn with_style(mut self, style: Style) -> Self { - self.base.style = Box::new(style); + *self.base.style = style; self } } |
