]> git.lizzy.rs Git - rust.git/commitdiff
Format
authortopecongiro <seuchida@gmail.com>
Wed, 30 Aug 2017 10:27:50 +0000 (19:27 +0900)
committertopecongiro <seuchida@gmail.com>
Wed, 30 Aug 2017 10:27:50 +0000 (19:27 +0900)
src/expr.rs

index f00dc6457f97e540a5097f9a201f2981feb6816c..f5275942425969f8b4551c4fbbc74445f8dd4605 100644 (file)
@@ -180,17 +180,11 @@ pub fn format_expr(
                 )
             }
         }
-        ast::ExprKind::Yield(ref opt_expr) => {
-            if let Some(ref expr) = *opt_expr {
-                rewrite_unary_prefix(context, "yield ", &**expr, shape)
-            } else {
-                wrap_str(
-                    "yield".to_string(),
-                    context.config.max_width(),
-                    shape,
-                )
-            }
-        }
+        ast::ExprKind::Yield(ref opt_expr) => if let Some(ref expr) = *opt_expr {
+            rewrite_unary_prefix(context, "yield ", &**expr, shape)
+        } else {
+            wrap_str("yield".to_string(), context.config.max_width(), shape)
+        },
         ast::ExprKind::Closure(capture, ref fn_decl, ref body, _) => {
             rewrite_closure(capture, fn_decl, body, expr.span, context, shape)
         }