]> git.lizzy.rs Git - rust.git/commitdiff
Format source codes
authortopecongiro <seuchida@gmail.com>
Sat, 17 Jun 2017 12:17:20 +0000 (21:17 +0900)
committertopecongiro <seuchida@gmail.com>
Sun, 18 Jun 2017 05:29:17 +0000 (14:29 +0900)
src/chains.rs
src/items.rs
src/patterns.rs
src/visitor.rs

index 1729505d63b616b334b09b79fa01b634a2cd4946..fb26fb2ff7d80a6e28621a9fd0571a35b4150df0 100644 (file)
@@ -226,8 +226,7 @@ pub fn rewrite_chain(expr: &ast::Expr, context: &RewriteContext, shape: Shape) -
                         total_span,
                         context,
                         shape,
-                    )
-                    {
+                    ) {
                         // If the first line of the last method does not fit into a single line
                         // after the others, allow new lines.
                         almost_total + first_line_width(&last[0]) < context.config.max_width()
index 09d866ccf8da86843fe3facb455a942026b45dda..b7c265748381da84a5e00f4cd3cf3f04e5619406 100644 (file)
@@ -588,8 +588,7 @@ pub fn format_impl(
             &result,
             &where_clause_str,
             &item,
-        ))
-        {
+        )) {
             result.push_str(&where_clause_str);
             if where_clause_str.contains('\n') {
                 let white_space = offset.to_string(context.config);
@@ -736,8 +735,7 @@ fn format_impl_ref_and_type(
                     true,
                     polarity_str,
                     result_len,
-                )
-            {
+                ) {
                 result.push_str(&trait_ref_str);
             } else {
                 let generics_str = try_opt!(rewrite_generics_inner(
@@ -2114,8 +2112,7 @@ fn rewrite_fn_base(
                 !has_braces,
                 put_args_in_block && ret_str.is_empty(),
                 Some(span.hi),
-            )
-        {
+            ) {
             if !where_clause_str.contains('\n') {
                 if last_line_width(&result) + where_clause_str.len() > context.config.max_width() {
                     result.push('\n');
index 1899944bc105f8836758ab215e4cd629909d8b24..ed444210081069f0e145698e0b393a0c0b6b9e3a 100644 (file)
@@ -376,8 +376,7 @@ fn count_wildcard_suffix_len(
     for item in items.iter().rev().take_while(|i| match i.item {
         Some(ref internal_string) if internal_string == "_" => true,
         _ => false,
-    })
-    {
+    }) {
         suffix_len += 1;
 
         if item.pre_comment.is_some() || item.post_comment.is_some() {
index d20b4e971b54a5ab77b31109a37c8ada8989e13e..b34108800e78046166c353d8cb47a31884397a08 100644 (file)
@@ -298,8 +298,7 @@ pub fn visit_item(&mut self, item: &ast::Item) {
                     item,
                     self.block_indent,
                     where_span_end,
-                )
-                {
+                ) {
                     self.buffer.push_str(&impl_str);
                     self.last_pos = source!(self, item.span).hi;
                 }
@@ -310,8 +309,7 @@ pub fn visit_item(&mut self, item: &ast::Item) {
                     &self.get_context(),
                     item,
                     self.block_indent,
-                )
-                {
+                ) {
                     self.buffer.push_str(&trait_str);
                     self.last_pos = source!(self, item.span).hi;
                 }