From ca70e5e321a3c174c53d0650feed84db471ac30d Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 11 Dec 2025 23:21:42 -1030 Subject: enable str_to_string clippy lint --- azalea-chat/src/style.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'azalea-chat/src/style.rs') diff --git a/azalea-chat/src/style.rs b/azalea-chat/src/style.rs index 4982a915..7792f812 100644 --- a/azalea-chat/src/style.rs +++ b/azalea-chat/src/style.rs @@ -62,7 +62,7 @@ static LEGACY_FORMAT_TO_COLOR: LazyLock for TextColor { return Err(format!("{} is not a color", formatter.name())); } let color = formatter.color().unwrap_or(0); - Ok(Self::new(color, Some(formatter.name().to_string()))) + Ok(Self::new(color, Some(formatter.name().to_owned()))) } } @@ -412,11 +412,8 @@ impl Style { insertion: j .get("insertion") .and_then(|v| v.as_str()) - .map(|s| s.to_string()), - font: j - .get("font") - .and_then(|v| v.as_str()) - .map(|s| s.to_string()), + .map(|s| s.to_owned()), + font: j.get("font").and_then(|v| v.as_str()).map(|s| s.to_owned()), } } -- cgit v1.2.3