From 16184d3e165018fa5b78f5f99cfc844e5af33bd6 Mon Sep 17 00:00:00 2001
From: topecongiro <seuchida@gmail.com>
Date: Fri, 1 Dec 2017 13:30:21 +0900
Subject: [PATCH] Cargo fmt and update a test

---
 src/checkstyle.rs      |  3 +--
 src/comment.rs         |  6 +-----
 src/config.rs          |  3 +--
 src/expr.rs            | 20 ++++----------------
 src/items.rs           |  4 +---
 src/lib.rs             |  3 +--
 src/types.rs           |  5 +----
 tests/target/macros.rs |  3 +--
 8 files changed, 11 insertions(+), 36 deletions(-)

diff --git a/src/checkstyle.rs b/src/checkstyle.rs
index 34c1d81d40c..cbb6573b322 100644
--- a/src/checkstyle.rs
+++ b/src/checkstyle.rs
@@ -57,8 +57,7 @@ where
                     writer,
                     "<error line=\"{}\" severity=\"warning\" message=\"Should be `{}`\" \
                      />",
-                    mismatch.line_number,
-                    message
+                    mismatch.line_number, message
                 )?;
             }
         }
diff --git a/src/comment.rs b/src/comment.rs
index 9b9056c4170..8b8112618b4 100644
--- a/src/comment.rs
+++ b/src/comment.rs
@@ -205,11 +205,7 @@ pub fn combine_strs_with_missing_comments(
     };
     Some(format!(
         "{}{}{}{}{}",
-        prev_str,
-        first_sep,
-        missing_comment,
-        second_sep,
-        next_str,
+        prev_str, first_sep, missing_comment, second_sep, next_str,
     ))
 }
 
diff --git a/src/config.rs b/src/config.rs
index 2b4665729c4..d7b5e8c6ee3 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -714,8 +714,7 @@ mod test {
             toml,
             format!(
                 "merge_derives = {}\nskip_children = {}\n",
-                merge_derives,
-                skip_children,
+                merge_derives, skip_children,
             )
         );
     }
diff --git a/src/expr.rs b/src/expr.rs
index 70363f7dd23..0215975f9a3 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -353,10 +353,7 @@ where
             if one_line_width <= shape.width {
                 return Some(format!(
                     "{}{}{}{}",
-                    lhs_result,
-                    pp.infix,
-                    rhs_result,
-                    pp.suffix
+                    lhs_result, pp.infix, rhs_result, pp.suffix
                 ));
             }
         }
@@ -390,10 +387,7 @@ where
     };
     Some(format!(
         "{}{}{}{}",
-        lhs_result,
-        infix_with_sep,
-        rhs_result,
-        pp.suffix
+        lhs_result, infix_with_sep, rhs_result, pp.suffix
     ))
 }
 
@@ -883,10 +877,7 @@ impl<'a> ControlFlow<'a> {
 
             let result = format!(
                 "{} {} {{ {} }} else {{ {} }}",
-                self.keyword,
-                pat_expr_str,
-                if_str,
-                else_str
+                self.keyword, pat_expr_str, if_str, else_str
             );
 
             if result.len() <= width {
@@ -1589,10 +1580,7 @@ fn rewrite_match_body(
 
         Some(format!(
             "{} =>{}{}{}",
-            pats_str,
-            block_sep,
-            body_str,
-            body_suffix
+            pats_str, block_sep, body_str, body_suffix
         ))
     };
 
diff --git a/src/items.rs b/src/items.rs
index ce0439b127b..b4fd5a340bc 100644
--- a/src/items.rs
+++ b/src/items.rs
@@ -844,9 +844,7 @@ fn rewrite_trait_ref(
         if !(retry && trait_ref_str.contains('\n')) {
             return Some(format!(
                 "{} {}{}",
-                generics_str,
-                polarity_str,
-                &trait_ref_str
+                generics_str, polarity_str, &trait_ref_str
             ));
         }
     }
diff --git a/src/lib.rs b/src/lib.rs
index 1eec30833b9..0b54c71a6eb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -93,8 +93,7 @@ impl fmt::Display for ErrorKind {
             ErrorKind::LineOverflow(found, maximum) => write!(
                 fmt,
                 "line exceeded maximum width (maximum: {}, found: {})",
-                maximum,
-                found
+                maximum, found
             ),
             ErrorKind::TrailingWhitespace => write!(fmt, "left behind trailing whitespace"),
             ErrorKind::BadIssue(issue) => write!(fmt, "found {}", issue),
diff --git a/src/types.rs b/src/types.rs
index 92a1adbbc8e..ef185a3f7d4 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -442,10 +442,7 @@ impl Rewrite for ast::WherePredicate {
                     {
                         format!(
                             "for< {} > {}{}{}",
-                            lifetime_str,
-                            type_str,
-                            colon,
-                            bounds_str
+                            lifetime_str, type_str, colon, bounds_str
                         )
                     } else {
                         format!("for<{}> {}{}{}", lifetime_str, type_str, colon, bounds_str)
diff --git a/tests/target/macros.rs b/tests/target/macros.rs
index 8230ae91161..8b22a457463 100644
--- a/tests/target/macros.rs
+++ b/tests/target/macros.rs
@@ -135,8 +135,7 @@ fn issue_1279() {
 fn issue_1555() {
     let hello = &format!(
         "HTTP/1.1 200 OK\r\nServer: {}\r\n\r\n{}",
-        "65454654654654654654654655464",
-        "4"
+        "65454654654654654654654655464", "4"
     );
 }