]> git.lizzy.rs Git - rust.git/commitdiff
Format source codes
authortopecongiro <seuchida@gmail.com>
Wed, 5 Jul 2017 16:03:07 +0000 (01:03 +0900)
committertopecongiro <seuchida@gmail.com>
Fri, 7 Jul 2017 00:04:06 +0000 (09:04 +0900)
src/bin/cargo-fmt.rs
src/expr.rs

index b4a1b3d51722176891c1c5471e5249f7e8dd38f8..95ac1a25bb9b2563654329e54e514b891ddc7c76 100644 (file)
@@ -142,14 +142,14 @@ fn get_fmt_args() -> Vec<String> {
 
 #[derive(Debug)]
 enum TargetKind {
-    Lib, // dylib, staticlib, lib
-    Bin, // bin
-    Example, // example file
-    Test, // test file
-    Bench, // bench file
+    Lib,         // dylib, staticlib, lib
+    Bin,         // bin
+    Example,     // example file
+    Test,        // test file
+    Bench,       // bench file
     CustomBuild, // build script
-    ProcMacro, // a proc macro implementation
-    Other, // plugin,...
+    ProcMacro,   // a proc macro implementation
+    Other,       // plugin,...
 }
 
 impl TargetKind {
index 1326d3c41b13f7f6fc8bc1ce3f86ebcc22ead304..971bdc21aaa90748286fcda23a972670bb8634fd 100644 (file)
@@ -1298,9 +1298,7 @@ fn rewrite_cond(
                 label_string,
                 self.keyword,
                 between_kwd_cond_comment.as_ref().map_or(
-                    if pat_expr_string.is_empty() ||
-                        pat_expr_string.starts_with('\n')
-                    {
+                    if pat_expr_string.is_empty() || pat_expr_string.starts_with('\n') {
                         ""
                     } else {
                         " "