From 31f595422a2f4c13b46d54d97ca2d7fe35d7b52e Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Wed, 11 Oct 2023 20:32:11 +0100 Subject: [PATCH] cargo fmt --- tooling/nargo_fmt/src/visitor/expr.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tooling/nargo_fmt/src/visitor/expr.rs b/tooling/nargo_fmt/src/visitor/expr.rs index 1f65fafe0fb..b5ff3e523bc 100644 --- a/tooling/nargo_fmt/src/visitor/expr.rs +++ b/tooling/nargo_fmt/src/visitor/expr.rs @@ -46,15 +46,18 @@ impl FmtVisitor<'_> { .iter() .map(|arg| { let arg_str = self.format_expr(arg.clone()).trim().to_string(); - if arg_str.contains('(') { - return arg_str.replace(" ,", ",").replace("( ", "(").replace(" )", ")"); + if arg_str.contains('(') { + return arg_str + .replace(" ,", ",") + .replace("( ", "(") + .replace(" )", ")"); } arg_str }) .collect::>() .join(", "); format!("{}.{}({})", formatted_object, method_call_expr.method_name, formatted_args) - } + } ExpressionKind::MemberAccess(member_access_expr) => { let lhs_str = self.format_expr(member_access_expr.lhs); format!("{}.{}", lhs_str, member_access_expr.rhs)