Skip to content

Commit 6d14522

Browse files
committed
Remove hopefully unecessary expression size simulation
1 parent 890aec3 commit 6d14522

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

lib/Fmt_ast.ml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,18 +1467,9 @@ and fmt_args_grouped ?epi:(global_epi = noop) c ctx args =
14671467
(list_fl args (fmt_arg c) $ fmt_if_k last global_epi)
14681468
$ fmt_if_k (not last) (break 1 0)
14691469
in
1470-
let is_simple (lbl, x) =
1470+
let is_simple (_lbl, x) =
14711471
let xexp = sub_exp ~ctx x in
1472-
let output =
1473-
Cmts.preserve
1474-
~cache_key:(Arg (lbl, x))
1475-
(fun () ->
1476-
let cmts = Cmts.drop_before c.cmts x.pexp_loc in
1477-
fmt_arg ~first:false ~last:false {c with cmts} (lbl, x) )
1478-
c.cmts
1479-
in
1480-
let breaks = String.(rstrip output |> is_substring ~substring:"\n ") in
1481-
is_simple c.conf (expression_width c) xexp && not breaks
1472+
is_simple c.conf (expression_width c) xexp
14821473
in
14831474
let break x y =
14841475
Cmts.has_after c.cmts (snd x).pexp_loc || not (is_simple x && is_simple y)

0 commit comments

Comments
 (0)