Skip to content

Commit 951761a

Browse files
committed
Minor code simplification.
Use a let binding instead of a function to destructure a tuple.
1 parent c7ed6fb commit 951761a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ml-proto/spec/eval.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ let rec eval_expr (c : config) (e : expr) =
153153
| BrSwitch (_t, ec, default, labels, eo) ->
154154
let e = some (eval_expr c ec) ec.at in
155155
raise (label c
156-
(try (fun (i, l) -> l)
157-
(List.find (fun (i, l) -> i = e) labels)
156+
(try
157+
let i, l = List.find (fun (i, l) -> i = e) labels in l
158158
with Not_found -> default)
159159
(eval_expr_option c eo))
160160

0 commit comments

Comments
 (0)