Fix tests
This commit is contained in:
parent
01c1f99e39
commit
1415a4dc23
@ -393,8 +393,9 @@ fn pop_expr_chain(expr: &ast::Expr, context: &RewriteContext) -> Option<ast::Exp
|
||||
ast::ExprKind::MethodCall(_, ref expressions) => {
|
||||
Some(convert_try(&expressions[0], context))
|
||||
}
|
||||
| ast::ExprKind::Field(ref subexpr, _)
|
||||
| ast::ExprKind::Try(ref subexpr) => Some(convert_try(subexpr, context)),
|
||||
ast::ExprKind::Field(ref subexpr, _) | ast::ExprKind::Try(ref subexpr) => {
|
||||
Some(convert_try(subexpr, context))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
@ -176,9 +176,9 @@ pub fn format_expr(
|
||||
capture, movability, fn_decl, body, expr.span, context, shape,
|
||||
)
|
||||
}
|
||||
ast::ExprKind::Try(..)
|
||||
| ast::ExprKind::Field(..)
|
||||
| ast::ExprKind::MethodCall(..) => rewrite_chain(expr, context, shape),
|
||||
ast::ExprKind::Try(..) | ast::ExprKind::Field(..) | ast::ExprKind::MethodCall(..) => {
|
||||
rewrite_chain(expr, context, shape)
|
||||
}
|
||||
ast::ExprKind::Mac(ref mac) => {
|
||||
rewrite_macro(mac, None, context, shape, MacroPosition::Expression).or_else(|| {
|
||||
wrap_str(
|
||||
|
Loading…
Reference in New Issue
Block a user