Skip to content

Commit

Permalink
Upgrade to Rust 1.81 (#13265)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser authored Sep 6, 2024
1 parent 594dee1 commit c3bcd5c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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("\'\'\'") {
Expand Down
3 changes: 1 addition & 2 deletions crates/ruff_python_parser/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ impl StringParser {

#[inline]
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();
c
})
}

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.80"
channel = "1.81"

0 comments on commit c3bcd5c

Please # to comment.