From e9cf89a06b31cf8cb064c1831d8e28b2288bdde2 Mon Sep 17 00:00:00 2001 From: Emile Trotignon Date: Fri, 6 Sep 2024 15:43:50 +0200 Subject: [PATCH] fmt --- lib/Params.ml | 5 ++--- lib/Params.mli | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Params.ml b/lib/Params.ml index 986b70f9bf..b1e49ba364 100644 --- a/lib/Params.ml +++ b/lib/Params.ml @@ -214,12 +214,11 @@ module Exp = struct let break_fun_decl_args c ~ctx ~last_arg ~has_label = match ctx with - | _ when not last_arg && ocp c -> str " " + | _ when (not last_arg) && ocp c -> str " " | Ast.Str _ -> (* special case that break the arrow in [let _ = fun ... ->] *) str " " - | _ -> - break 1 (if last_arg && has_label && not (ocp c) then 0 else -2) + | _ -> break 1 (if last_arg && has_label && not (ocp c) then 0 else -2) let single_line_function ~ctx ~ctx0 ~args = match ctx_is_apply_and_exp_is_arg ~ctx ctx0 with diff --git a/lib/Params.mli b/lib/Params.mli index df2e30ec9a..867eda78b7 100644 --- a/lib/Params.mli +++ b/lib/Params.mli @@ -66,7 +66,7 @@ module Exp : sig attributes. *) val break_fun_decl_args : - Conf.t -> ctx:Ast.t -> last_arg:bool -> has_label:bool -> Fmt.t + Conf.t -> ctx:Ast.t -> last_arg:bool -> has_label:bool -> Fmt.t val single_line_function : ctx:Ast.t -> ctx0:Ast.t -> args:'a list -> bool