diff options
| author | mat <git@matdoes.dev> | 2025-12-11 23:21:42 -1030 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-12-11 23:21:42 -1030 |
| commit | ca70e5e321a3c174c53d0650feed84db471ac30d (patch) | |
| tree | 43042fa40c2f3d7f30ea56e1ee84c59dcb13be66 /azalea-chat/src/style.rs | |
| parent | 918214e8ba4eae65daf5d2da17aa0022f2ae5212 (diff) | |
| download | azalea-drasl-ca70e5e321a3c174c53d0650feed84db471ac30d.tar.xz | |
enable str_to_string clippy lint
Diffstat (limited to 'azalea-chat/src/style.rs')
| -rw-r--r-- | azalea-chat/src/style.rs | 11 |
1 files changed, 4 insertions, 7 deletions
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<HashMap<&'static ChatFormatting, TextCol formatter, TextColor { value: formatter.color().unwrap(), - name: Some(formatter.name().to_string()), + name: Some(formatter.name().to_owned()), }, ); } @@ -300,7 +300,7 @@ impl TryFrom<ChatFormatting> 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()), } } |
