about summary refs log tree commit diff
path: root/src/expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr.rs')
-rw-r--r--src/expr.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/expr.rs b/src/expr.rs
index 329081f5d70..fef4a024cf5 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -179,11 +179,13 @@ pub fn format_expr(
                 Some(format!("break{}", id_str))
             }
         }
-        ast::ExprKind::Yield(ref opt_expr) => if let Some(ref expr) = *opt_expr {
-            rewrite_unary_prefix(context, "yield ", &**expr, shape)
-        } else {
-            Some("yield".to_string())
-        },
+        ast::ExprKind::Yield(ref opt_expr) => {
+            if let Some(ref expr) = *opt_expr {
+                rewrite_unary_prefix(context, "yield ", &**expr, shape)
+            } else {
+                Some("yield".to_string())
+            }
+        }
         ast::ExprKind::Closure(capture, asyncness, movability, ref fn_decl, ref body, _) => {
             closures::rewrite_closure(
                 capture, asyncness, movability, fn_decl, body, expr.span, context, shape,