chore: fix clippy lints

This commit is contained in:
ThetaDev 2024-05-02 19:39:48 +02:00
parent 5dbb288a49
commit 45b9f2a627
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6
10 changed files with 21 additions and 18 deletions

View file

@ -658,9 +658,12 @@ impl TextComponents {
}
}
impl ToString for TextComponents {
fn to_string(&self) -> String {
self.0.iter().map(TextComponent::as_str).collect::<String>()
impl std::fmt::Display for TextComponents {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
for t in &self.0 {
f.write_str(t.as_str())?;
}
Ok(())
}
}