]> git.lizzy.rs Git - rust.git/commitdiff
Cargo fmt and update a test
authortopecongiro <seuchida@gmail.com>
Fri, 1 Dec 2017 04:30:21 +0000 (13:30 +0900)
committerSeiichi Uchida <seuchida@gmail.com>
Sun, 3 Dec 2017 02:34:18 +0000 (11:34 +0900)
src/checkstyle.rs
src/comment.rs
src/config.rs
src/expr.rs
src/items.rs
src/lib.rs
src/types.rs
tests/target/macros.rs

index 34c1d81d40cda291c74cbb96326671c9ee254737..cbb6573b322e8f5e57b74ff6db075647abfa8ec3 100644 (file)
@@ -57,8 +57,7 @@ pub fn output_checkstyle_file<T>(
                     writer,
                     "<error line=\"{}\" severity=\"warning\" message=\"Should be `{}`\" \
                      />",
-                    mismatch.line_number,
-                    message
+                    mismatch.line_number, message
                 )?;
             }
         }
index 9b9056c4170b20e112524757653ddb496ad94544..8b8112618b4a8c948ae616846cd74cdc5c2a57b0 100644 (file)
@@ -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,
     ))
 }
 
index 2b4665729c4c26ee9cbc5a4081294e3e85103119..d7b5e8c6ee3a62fbfa1401475cb5cb6bac6175ee 100644 (file)
@@ -714,8 +714,7 @@ fn test_config_used_to_toml() {
             toml,
             format!(
                 "merge_derives = {}\nskip_children = {}\n",
-                merge_derives,
-                skip_children,
+                merge_derives, skip_children,
             )
         );
     }
index 70363f7dd23115be4f6a1ed1a1f5d5b04fab6fa0..0215975f9a35d4d26e86d7cf377a66650fc41d97 100644 (file)
@@ -353,10 +353,7 @@ pub fn rewrite_pair<LHS, RHS>(
             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 @@ pub fn rewrite_pair<LHS, RHS>(
     };
     Some(format!(
         "{}{}{}{}",
-        lhs_result,
-        infix_with_sep,
-        rhs_result,
-        pp.suffix
+        lhs_result, infix_with_sep, rhs_result, pp.suffix
     ))
 }
 
@@ -883,10 +877,7 @@ fn rewrite_single_line(
 
             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
         ))
     };
 
index ce0439b127b32cfd9a34243084c6461faa7914ae..b4fd5a340bce2a5b4bc464b6de271d47d852e9e4 100644 (file)
@@ -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
             ));
         }
     }
index 1eec30833b9cc3b0fae6785863e0c870a81c0f1e..0b54c71a6eb07f8a8ea4a7304e5ceea8ec96c49e 100644 (file)
@@ -93,8 +93,7 @@ fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
             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),
index 92a1adbbc8ef6d72ee03e66c9c3a097549c07a7c..ef185a3f7d4d1a02bd89afdda3e297826d2be363 100644 (file)
@@ -442,10 +442,7 @@ fn rewrite(&self, context: &RewriteContext, shape: Shape) -> Option<String> {
                     {
                         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)
index 8230ae911618b22028bb4826543bdef07afbcf42..8b22a45746311c454fa4f5b8f0121ae6b367def5 100644 (file)
@@ -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"
     );
 }