diff options
| author | mat <git@matdoes.dev> | 2025-05-30 19:36:59 -0800 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-05-30 19:36:59 -0800 |
| commit | ae4b1e85e669bc882d158509ef1eda46c6b2a72e (patch) | |
| tree | adf81cc01b0ce1575e95b99ad109fd92db1738f6 /azalea-chat/src/translatable_component.rs | |
| parent | a64c6505049082175224802c5be51ac8f0cf4677 (diff) | |
| download | azalea-drasl-ae4b1e85e669bc882d158509ef1eda46c6b2a72e.tar.xz | |
fix clippy issues and improve formatting everywhere
Diffstat (limited to 'azalea-chat/src/translatable_component.rs')
| -rw-r--r-- | azalea-chat/src/translatable_component.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-chat/src/translatable_component.rs b/azalea-chat/src/translatable_component.rs index 452de738..431c08b2 100644 --- a/azalea-chat/src/translatable_component.rs +++ b/azalea-chat/src/translatable_component.rs @@ -1,4 +1,4 @@ -use std::fmt::{self, Display, Formatter}; +use std::fmt::{self, Display}; use serde::{__private::ser::FlatMapSerializer, Serialize, Serializer, ser::SerializeMap}; #[cfg(feature = "simdnbt")] @@ -189,7 +189,7 @@ impl TranslatableComponent { } impl Display for TranslatableComponent { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { // this contains the final string will all the ansi escape codes for component in FormattedText::Translatable(self.clone()).into_iter() { let component_text = match &component { @@ -208,7 +208,7 @@ impl Display for TranslatableComponent { } impl Display for StringOrComponent { - fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { match self { StringOrComponent::String(s) => write!(f, "{s}"), StringOrComponent::FormattedText(c) => write!(f, "{c}"), |
