use let* in user.ml

This commit is contained in:
Swrup 2022-01-14 21:36:25 +01:00
parent 8f6c376f0d
commit 18df99534e
3 changed files with 83 additions and 100 deletions

View file

@ -54,7 +54,7 @@ type post =
let ( let** ) o f =
match o with
| Error e -> Error (Format.sprintf "db error: %s" (Caqti_error.show e))
| Ok None -> Error (Format.sprintf "db error: value not found")
| Ok None -> Error "db error"
| Ok (Some x) -> f x
(* ('a, string) result *)