From 7b7b12223205d5df21a31ae8e6fcd7ad69bd7cb4 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 28 Mar 2026 15:07:52 -1100 Subject: re-export azalea-chat from azalea, and rename azalea::chat to client_chat --- azalea-chat/src/component.rs | 10 ---------- azalea-chat/src/text_component.rs | 6 ++++++ azalea-chat/src/translatable_component.rs | 5 +++++ 3 files changed, 11 insertions(+), 10 deletions(-) (limited to 'azalea-chat/src') diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs index b338fe2d..90906bfd 100644 --- a/azalea-chat/src/component.rs +++ b/azalea-chat/src/component.rs @@ -674,16 +674,6 @@ impl From<&str> for FormattedText { Self::from(s.to_owned()) } } -impl From for FormattedText { - fn from(c: TranslatableComponent) -> Self { - FormattedText::Translatable(c) - } -} -impl From for FormattedText { - fn from(c: TextComponent) -> Self { - FormattedText::Text(c) - } -} impl Display for FormattedText { /// Render the text in the component but without any formatting/styling. diff --git a/azalea-chat/src/text_component.rs b/azalea-chat/src/text_component.rs index 41f03965..78270bd8 100644 --- a/azalea-chat/src/text_component.rs +++ b/azalea-chat/src/text_component.rs @@ -164,6 +164,12 @@ impl Display for TextComponent { } } +impl From for FormattedText { + fn from(c: TextComponent) -> Self { + FormattedText::Text(c) + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/azalea-chat/src/translatable_component.rs b/azalea-chat/src/translatable_component.rs index a846b550..b745f7d3 100644 --- a/azalea-chat/src/translatable_component.rs +++ b/azalea-chat/src/translatable_component.rs @@ -237,6 +237,11 @@ impl From<&str> for TranslatableComponent { TranslatableComponent::new(s.to_owned(), vec![]) } } +impl From for FormattedText { + fn from(c: TranslatableComponent) -> Self { + FormattedText::Translatable(c) + } +} #[cfg(test)] mod tests { -- cgit v1.2.3