about summary refs log tree commit diff
path: root/src/expr.rs
diff options
context:
space:
mode:
authortopecongiro <seuchida@gmail.com>2017-04-15 16:22:26 +0900
committertopecongiro <seuchida@gmail.com>2017-04-15 16:22:26 +0900
commit8a5038c8f59684d48d2e1d1cedca36dd7fcd77a2 (patch)
tree9cd54be8e70d8674d02c77d96806113c704c7a02 /src/expr.rs
parentb4833a8c581f92e87eeb0f5a6f11719f4eb94092 (diff)
Use offset instead of indent for match arm
Diffstat (limited to 'src/expr.rs')
-rw-r--r--src/expr.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/expr.rs b/src/expr.rs
index 2723c4099c1..a8223fbc400 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -1344,11 +1344,10 @@ impl Rewrite for ast::Arm {
         // 4 = ` => `.len()
         if shape.width > pat_width + comma.len() + 4 {
             let arm_shape = shape
-                .shrink_left(pat_width + 4)
+                .offset_left(pat_width + 4)
                 .unwrap()
                 .sub_width(comma.len())
-                .unwrap()
-                .block();
+                .unwrap();
             let rewrite = nop_block_collapse(body.rewrite(context, arm_shape), arm_shape.width);
             let is_block = if let ast::ExprKind::Block(..) = body.node {
                 true