Upgrade to Rust 1.81 (#13265)

This commit is contained in:
Micha Reiser 2024-09-06 15:09:09 +02:00 committed by GitHub
parent 594dee1b0b
commit c3bcd5c842
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 6 deletions

View file

@ -67,9 +67,7 @@ impl Violation for TripleSingleQuotes {
pub(crate) fn triple_quotes(checker: &mut Checker, docstring: &Docstring) {
let leading_quote = docstring.leading_quote();
let prefixes = leading_quote
.trim_end_matches(|c| c == '\'' || c == '"')
.to_owned();
let prefixes = leading_quote.trim_end_matches(['\'', '"']).to_owned();
let expected_quote = if docstring.body().contains("\"\"\"") {
if docstring.body().contains("\'\'\'") {