diff options
| author | Matias Goldfeld <[email protected]> | 2021-01-29 13:42:34 -0500 |
|---|---|---|
| committer | Matias Goldfeld <[email protected]> | 2021-01-29 13:42:34 -0500 |
| commit | 2f37138dedb34651ddb2efd687a8d860b0138778 (patch) | |
| tree | b0d89ca5795724b3bb804f2d65ee609217567ecd /lib/models/id/user_id_t.ml | |
| parent | Revert "More 32 bit fixes" (diff) | |
| download | disml-2f37138dedb34651ddb2efd687a8d860b0138778.tar.xz disml-2f37138dedb34651ddb2efd687a8d860b0138778.zip | |
Reverted attempts to add 32-bit compatibility
Diffstat (limited to 'lib/models/id/user_id_t.ml')
| -rw-r--r-- | lib/models/id/user_id_t.ml | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/models/id/user_id_t.ml b/lib/models/id/user_id_t.ml index cf1634a..fab0f00 100644 --- a/lib/models/id/user_id_t.ml +++ b/lib/models/id/user_id_t.ml @@ -1,15 +1,7 @@ open Core
-type t = [ `User_id of Snowflake.t ] [@@deriving sexp]
+type t = Snowflake.t [@@deriving sexp, yojson]
-let compare (`User_id t) (`User_id t') = Int.compare t t'
+let compare t t' = Int64.compare t t'
-let of_yojson a : (t, string) result =
- match Snowflake.of_yojson a with
- | Ok id -> Ok (`User_id id)
- | Error err -> Error err
-
-let of_yojson_exn a : t = `User_id (Snowflake.of_yojson_exn a)
-let to_yojson (`User_id id) = (Snowflake.to_yojson id)
-
-let get_id (`User_id id) = id
\ No newline at end of file +let get_id id = id
\ No newline at end of file |