Centralize clippy lints in .cargo/config.toml

This commit is contained in:
Héctor Ramón Jiménez 2023-09-20 16:40:03 +02:00
parent b8ddd158da
commit f137d71e8f
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
13 changed files with 16 additions and 81 deletions

View file

@ -89,11 +89,6 @@ impl Value {
Self { graphemes }
}
/// Converts the [`Value`] into a `String`.
pub fn to_string(&self) -> String {
self.graphemes.concat()
}
/// Inserts a new `char` at the given grapheme `index`.
pub fn insert(&mut self, index: usize, c: char) {
self.graphemes.insert(index, c.to_string());
@ -131,3 +126,9 @@ impl Value {
}
}
}
impl std::fmt::Display for Value {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(&self.graphemes.concat())
}
}