Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
EmileTrotignon committed Sep 6, 2024
1 parent 0ecb061 commit e9cf89a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/Params.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/Params.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e9cf89a

Please sign in to comment.