Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix warnings, add lower bound on containers #93

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion redis-lwt.opam
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ depends: [
"lwt" {>= "2.4.7"}
"ocaml" { >= "4.03.0" }
"ounit2" {with-test}
"containers" {with-test}
"containers" {with-test & >= "3.0"}
"odoc" {with-doc}
]
2 changes: 1 addition & 1 deletion redis-sync.opam
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ depends: [
"ocaml" { >= "4.03.0" }
"camlp-streams"
"ounit2" {with-test}
"containers" {with-test}
"containers" {with-test & >= "3.0"}
"odoc" {with-doc}
]
1 change: 1 addition & 0 deletions redis.opam
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ depends: [
"stdlib-shims"
"re" {>= "1.7.2"}
"ocaml" { >= "4.03.0" }
"containers" {with-test & >= "3.0"}
"odoc" {with-doc}
]
7 changes: 0 additions & 7 deletions src/client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,6 @@ module Common(IO: S.IO) = struct
| `Int n -> IO.return n
| x -> IO.fail (Unexpected x)

let return_int64 = function
| `Int n -> IO.return (Int64.of_int n)
| `Int64 n -> IO.return n
| x -> IO.fail (Unexpected x)

let return_float = function
| `Int n -> IO.return (float_of_int n)
| `Int64 n -> IO.return (Int64.to_float n)
Expand Down Expand Up @@ -539,12 +534,10 @@ module type Mode = sig
val return_no_nil_bulk : reply -> string IO.t
val return_bool : reply -> bool IO.t
val return_status : reply -> [> `Status of string ] IO.t
val return_expected_status : string -> reply -> unit IO.t
val return_ok_or_nil : reply -> bool IO.t
val return_ok_status : reply -> unit IO.t
val return_queued_status : reply -> unit IO.t
val return_int : reply -> int IO.t
val return_int64 : reply -> Int64.t IO.t
val return_float : reply -> float IO.t
val return_int_option : reply -> int option IO.t
val return_float_option : reply -> float option IO.t
Expand Down
2 changes: 1 addition & 1 deletion src/mutex.ml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module Make(IO : S.IO)(Client : S.Client with module IO = IO) = struct
IO.fail (Error ("lock was lost: " ^ mutex))

let with_mutex conn ?atime ?ltime mutex fn =
let id = Uuidm.(to_string (create `V4)) in
let id = Uuidm.(to_string (create `V4) [@ocaml.alert "-deprecated"]) in
acquire conn ?atime ?ltime mutex id >>= fun _ ->
IO.catch
(* try *) (fun () ->
Expand Down
2 changes: 1 addition & 1 deletion test/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ end = struct
Client.info conn >>| fun result ->
(let tcp_port =
CCList.find_map (fun (k,v) -> if k = "tcp_port" then Some v else None) result
|> CCOpt.get_lazy (fun () -> assert_failure "didn't find any port")
|> CCOption.get_lazy (fun () -> assert_failure "didn't find any port")
in
assert_bool "Got wrong data about port with INFO command"
(int_of_string tcp_port = 6379))
Expand Down
Loading