chore: some more clippy lints

This commit is contained in:
Amaan Qureshi 2024-02-13 03:04:33 -05:00
parent a07f988905
commit 5ea0dbf77a
3 changed files with 14 additions and 13 deletions

View file

@ -263,11 +263,11 @@ impl Pattern {
}
}
impl ToString for Pattern {
fn to_string(&self) -> String {
impl std::fmt::Display for Pattern {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut result = String::new();
self.write_to_string(&mut result, 0);
result
write!(f, "{result}")
}
}