From 1415a4dc23f28644cb197b6bb69c311245c216e2 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Sat, 14 Apr 2018 10:20:08 +1200 Subject: [PATCH] Fix tests --- src/chains.rs | 5 +++-- src/expr.rs | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/chains.rs b/src/chains.rs index 50e8ba6cdef..94099002f73 100644 --- a/src/chains.rs +++ b/src/chains.rs @@ -393,8 +393,9 @@ fn pop_expr_chain(expr: &ast::Expr, context: &RewriteContext) -> Option { 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, } } diff --git a/src/expr.rs b/src/expr.rs index 7c4c16178a7..5f786f96500 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -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(