diff options
Diffstat (limited to 'lib/models/snowflake.ml')
| -rw-r--r-- | lib/models/snowflake.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/models/snowflake.ml b/lib/models/snowflake.ml index 9e630e1..21846fc 100644 --- a/lib/models/snowflake.ml +++ b/lib/models/snowflake.ml @@ -2,10 +2,10 @@ open Core type t = int -let of_yojson_exn d = Yojson.Safe.Util.to_string d |> Int.of_string |> Ok +let of_yojson_exn d = Yojson.Safe.Util.to_string d |> Int.of_string let of_yojson d = - try of_yojson_exn d + try of_yojson_exn d |> Ok with Yojson.Safe.Util.Type_error (why,_) -> Error why let to_yojson s : Yojson.Safe.json = `String (Int.to_string s) |