Skip to content

Commit

Permalink
ppx: better naming for args
Browse files Browse the repository at this point in the history
  • Loading branch information
jchavarri committed Aug 30, 2024
1 parent 0b20f8c commit 0107f14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ppx/native/ppx_deriving_json_runtime.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0107f14

Please sign in to comment.