use let* in user.ml
This commit is contained in:
parent
a88ab15b35
commit
76ffec81d1
3 changed files with 83 additions and 100 deletions
|
|
@ -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 *)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue