aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEstevan Castilho <tevo@riajuu.net>2026-04-29 23:29:12 +0000
committerEstevan Castilho <tevo@riajuu.net>2026-04-30 00:05:09 +0000
commit0658be42e7458907b8ff5f9ce50152f6bf5fd966 (patch)
treeda306a0fc8a78fb7473395a94c38b65f4e0519c6 /lib
parentbe86484d87d97ea3bddeceeedc2b8341290cc5a6 (diff)
downloadSakura-0658be42e7458907b8ff5f9ce50152f6bf5fd966.tar.gz
Sakura-0658be42e7458907b8ff5f9ce50152f6bf5fd966.zip
Use `Result` rather than a custom type
Diffstat (limited to 'lib')
-rw-r--r--lib/external/lmdb.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/external/lmdb.ml b/lib/external/lmdb.ml
index d2e6be0..7b0812d 100644
--- a/lib/external/lmdb.ml
+++ b/lib/external/lmdb.ml
@@ -2,15 +2,15 @@ open Ctypes
open PosixTypes
open Foreign
-type mdb_result = Success | Failure of int
+type mdb_result = (unit, int) Result.t
let mdb_result_of_int = function
- | 0 -> Success
- | x -> Failure x
+ | 0 -> Ok ()
+ | x -> Error x
let int_of_mdb_result = function
- | Success -> 0
- | Failure x -> x
+ | Ok _ -> 0
+ | Error x -> x
let mdb_mode_t = mode_t