Skip to content

Commit 9a4b273

Browse files
committed
Fix compatibility with 4.08
1 parent 58c5404 commit 9a4b273

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ocaml_protoc_plugin/serialize.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,13 @@ let%expect_test "zigzag encoding" =
182182
let test_values =
183183
[Int64.min_int; n2l Int.min_int; i2l Int32.min_int; -2L;
184184
0L; 3L; i2l Int32.max_int; n2l Int.max_int; Int64.max_int]
185-
|> List.concat_map ~f:(
185+
|> List.map ~f:(
186186
let open Infix.Int64 in
187187
function
188188
| v when v > 0L -> [pred v; v]
189189
| v -> [v; succ v]
190190
)
191+
|> List.concat
191192
in
192193
List.iter ~f:(fun vl -> Printf.printf "zigzag_encoding 0x%016Lx = 0x%016Lx\n" vl (encode_zigzag vl)) test_values;
193194
List.iter ~f:(fun v -> Printf.printf "zigzag_encoding_unboxed 0x%016x = 0x%016x\n" (Int64.to_int v) (Int64.to_int v |> encode_zigzag_unboxed)) test_values;

0 commit comments

Comments
 (0)