From 0107f14a88f21a62e805af2a60b1d0c5b0238a8f Mon Sep 17 00:00:00 2001 From: Javier Chavarri Date: Fri, 30 Aug 2024 16:31:39 +0000 Subject: [PATCH] ppx: better naming for args --- ppx/native/ppx_deriving_json_runtime.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ppx/native/ppx_deriving_json_runtime.ml b/ppx/native/ppx_deriving_json_runtime.ml index 65c4f23..d25d559 100644 --- a/ppx/native/ppx_deriving_json_runtime.ml +++ b/ppx/native/ppx_deriving_json_runtime.ml @@ -42,10 +42,10 @@ module Of_json = struct let list_of_json v_of_json json = List.map v_of_json (Yojson.Basic.Util.to_list json) - let result_of_json a_of_json b_of_json json = + let result_of_json ok_of_json err_of_json json = match json with - | `List [ `String "Ok"; x ] -> Ok (a_of_json x) - | `List [ `String "Error"; x ] -> Error (b_of_json x) + | `List [ `String "Ok"; x ] -> Ok (ok_of_json x) + | `List [ `String "Error"; x ] -> Error (err_of_json x) | _ -> of_json_error "invalid JSON" end