Upgrade Rust toolchain to 1.83 (#14677)

This commit is contained in:
Micha Reiser 2024-11-29 13:05:05 +01:00 committed by GitHub
parent a6402fb51e
commit b63c2e126b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
63 changed files with 127 additions and 127 deletions

View file

@ -881,7 +881,7 @@ impl Format<PyFormatContext<'_>> for Operand<'_> {
fn fmt(&self, f: &mut Formatter<PyFormatContext<'_>>) -> FormatResult<()> {
let expression = self.expression();
return if is_expression_parenthesized(
if is_expression_parenthesized(
expression.into(),
f.context().comments().ranges(),
f.context().source(),
@ -1017,7 +1017,7 @@ impl Format<PyFormatContext<'_>> for Operand<'_> {
Ok(())
} else {
expression.format().with_options(Parentheses::Never).fmt(f)
};
}
}
}

View file

@ -133,9 +133,7 @@ impl FormatNodeRule<ExprTuple> for FormatExprTuple {
// ```
// In all other cases comments get assigned to a list element
match elts.as_slice() {
[] => {
return empty_parenthesized("(", dangling, ")").fmt(f);
}
[] => empty_parenthesized("(", dangling, ")").fmt(f),
[single] => match self.parentheses {
TupleParentheses::Preserve if !is_parenthesized => {
single.format().fmt(f)?;

View file

@ -14,7 +14,7 @@ pub(super) enum AnyExpressionYield<'a> {
YieldFrom(&'a ExprYieldFrom),
}
impl<'a> AnyExpressionYield<'a> {
impl AnyExpressionYield<'_> {
const fn is_yield_from(&self) -> bool {
matches!(self, AnyExpressionYield::YieldFrom(_))
}