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) => {
|
ast::ExprKind::MethodCall(_, ref expressions) => {
|
||||||
Some(convert_try(&expressions[0], context))
|
Some(convert_try(&expressions[0], context))
|
||||||
}
|
}
|
||||||
| ast::ExprKind::Field(ref subexpr, _)
|
ast::ExprKind::Field(ref subexpr, _) | ast::ExprKind::Try(ref subexpr) => {
|
||||||
| ast::ExprKind::Try(ref subexpr) => Some(convert_try(subexpr, context)),
|
Some(convert_try(subexpr, context))
|
||||||
|
}
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -176,9 +176,9 @@ pub fn format_expr(
|
|||||||
capture, movability, fn_decl, body, expr.span, context, shape,
|
capture, movability, fn_decl, body, expr.span, context, shape,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
ast::ExprKind::Try(..)
|
ast::ExprKind::Try(..) | ast::ExprKind::Field(..) | ast::ExprKind::MethodCall(..) => {
|
||||||
| ast::ExprKind::Field(..)
|
rewrite_chain(expr, context, shape)
|
||||||
| ast::ExprKind::MethodCall(..) => rewrite_chain(expr, context, shape),
|
}
|
||||||
ast::ExprKind::Mac(ref mac) => {
|
ast::ExprKind::Mac(ref mac) => {
|
||||||
rewrite_macro(mac, None, context, shape, MacroPosition::Expression).or_else(|| {
|
rewrite_macro(mac, None, context, shape, MacroPosition::Expression).or_else(|| {
|
||||||
wrap_str(
|
wrap_str(
|
||||||
|
Loading…
Reference in New Issue
Block a user