Upgrade Rust toolchain to 1.83 (#14677)
This commit is contained in:
@@ -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)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)?;
|
||||
|
||||
@@ -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(_))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user