mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 20:10:09 +00:00
Upgrade to Rust 1.81 (#13265)
This commit is contained in:
parent
594dee1b0b
commit
c3bcd5c842
3 changed files with 3 additions and 6 deletions
|
@ -67,9 +67,7 @@ impl Violation for TripleSingleQuotes {
|
||||||
pub(crate) fn triple_quotes(checker: &mut Checker, docstring: &Docstring) {
|
pub(crate) fn triple_quotes(checker: &mut Checker, docstring: &Docstring) {
|
||||||
let leading_quote = docstring.leading_quote();
|
let leading_quote = docstring.leading_quote();
|
||||||
|
|
||||||
let prefixes = leading_quote
|
let prefixes = leading_quote.trim_end_matches(['\'', '"']).to_owned();
|
||||||
.trim_end_matches(|c| c == '\'' || c == '"')
|
|
||||||
.to_owned();
|
|
||||||
|
|
||||||
let expected_quote = if docstring.body().contains("\"\"\"") {
|
let expected_quote = if docstring.body().contains("\"\"\"") {
|
||||||
if docstring.body().contains("\'\'\'") {
|
if docstring.body().contains("\'\'\'") {
|
||||||
|
|
|
@ -97,9 +97,8 @@ impl StringParser {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn next_char(&mut self) -> Option<char> {
|
fn next_char(&mut self) -> Option<char> {
|
||||||
self.source[self.cursor..].chars().next().map(|c| {
|
self.source[self.cursor..].chars().next().inspect(|c| {
|
||||||
self.cursor += c.len_utf8();
|
self.cursor += c.len_utf8();
|
||||||
c
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.80"
|
channel = "1.81"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue