Skip to content

Commit f6f6990

Browse files
committed
fix format
1 parent 20e71e0 commit f6f6990

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.ocamlformat

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 0.24.1
1+
version = 0.26.2
22
profile=conventional
33
margin=80
44
if-then-else=k-r
@@ -12,3 +12,4 @@ field-space=tight-decl
1212
leading-nested-match-parens=true
1313
module-item-spacing=compact
1414
quiet=true
15+
ocaml-version=4.08

src/compilerlib/pb_codegen_encode_yojson.ml

+7-3
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,17 @@ let gen_rft_variant sc rf_label { Ot.v_constructors; _ } =
136136
F.sub_scope sc (fun sc ->
137137
match vc_field_type with
138138
| Ot.Vct_nullary ->
139-
F.linep sc "| %s -> (\"%s\", `Null) :: assoc" vc_constructor json_label
139+
F.linep sc "| %s -> (\"%s\", `Null) :: assoc" vc_constructor
140+
json_label
140141
| Ot.Vct_non_nullary_constructor field_type ->
141142
(match
142143
gen_field var_name json_label field_type vc_payload_kind
143144
with
144-
| None -> F.linep sc "| %s -> (\"%s\", `Null) :: assoc" vc_constructor json_label
145-
| Some exp -> F.linep sc "| %s v -> %s :: assoc" vc_constructor exp)))
145+
| None ->
146+
F.linep sc "| %s -> (\"%s\", `Null) :: assoc" vc_constructor
147+
json_label
148+
| Some exp ->
149+
F.linep sc "| %s v -> %s :: assoc" vc_constructor exp)))
146150
v_constructors);
147151

148152
F.linep sc "in (* match v.%s *)" rf_label

0 commit comments

Comments
 (0)