From ae4b1e85e669bc882d158509ef1eda46c6b2a72e Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 30 May 2025 19:36:59 -0800 Subject: fix clippy issues and improve formatting everywhere --- azalea-chat/src/text_component.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'azalea-chat/src/text_component.rs') diff --git a/azalea-chat/src/text_component.rs b/azalea-chat/src/text_component.rs index 62547d0d..228dad3b 100644 --- a/azalea-chat/src/text_component.rs +++ b/azalea-chat/src/text_component.rs @@ -1,4 +1,4 @@ -use std::fmt::Display; +use std::fmt::{self, Display}; use serde::{__private::ser::FlatMapSerializer, Serialize, Serializer, ser::SerializeMap}; @@ -142,7 +142,7 @@ impl TextComponent { } impl Display for TextComponent { - 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::Text(self.clone()).into_iter() { let component_text = match &component { @@ -191,9 +191,9 @@ mod tests { format!( "{GREEN}Hypixel Network {END_SPAN}{RED}[1.8-1.18]
{END_SPAN}{BOLD_AQUA}HAPPY HOLIDAYS{END_SPAN}", END_SPAN = "", - GREEN = "", - RED = "", - BOLD_AQUA = "", + GREEN = "", + RED = "", + BOLD_AQUA = "", ) ); } @@ -207,8 +207,8 @@ mod tests { format!( "{GREEN}<b>&
{END_SPAN}{AQUA}</b>{END_SPAN}", END_SPAN = "
", - GREEN = "", - AQUA = "", + GREEN = "", + AQUA = "", ) ); } -- cgit v1.2.3