Replace format! without parameters with .to_string() (#14090)

Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
This commit is contained in:
Simon Brugman 2024-11-04 15:09:30 +01:00 committed by GitHub
parent 6dabf045c3
commit a7a78f939c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
69 changed files with 126 additions and 135 deletions

View file

@ -55,11 +55,11 @@ impl Violation for TripleSingleQuotes {
}
fn fix_title(&self) -> Option<String> {
let TripleSingleQuotes { expected_quote } = self;
Some(match expected_quote {
Quote::Double => format!("Convert to triple double quotes"),
Quote::Single => format!("Convert to triple single quotes"),
})
let title = match self.expected_quote {
Quote::Double => "Convert to triple double quotes",
Quote::Single => "Convert to triple single quotes",
};
Some(title.to_string())
}
}