]> git.lizzy.rs Git - rust.git/commitdiff
Use struct prefix as a callee
authortopecongiro <seuchida@gmail.com>
Wed, 8 Nov 2017 02:52:25 +0000 (11:52 +0900)
committertopecongiro <seuchida@gmail.com>
Wed, 8 Nov 2017 02:52:25 +0000 (11:52 +0900)
src/items.rs

index 731ce2343886018f0ff0d8aff775e9db70ec2a87..6cfcc3dd4b114afc5cdc9d2b69d1c367bf6450e1 100644 (file)
@@ -1282,16 +1282,15 @@ fn format_tuple_struct(
         result.push(')');
     } else {
         // 1 = ","
-        let body = rewrite_call_inner(
+        result = rewrite_call_inner(
             context,
-            "",
+            &result,
             &fields.iter().map(|field| field).collect::<Vec<_>>()[..],
             span,
             Shape::indented(offset, context.config).sub_width(1)?,
             context.config.fn_call_width(),
             false,
         )?;
-        result.push_str(&body);
     }
 
     if !where_clause_str.is_empty() && !where_clause_str.contains('\n')