From f48bd7fa06180e5e42f0d6877ddcbb277b4965b3 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 24 Jun 2024 01:04:51 +0100 Subject: [PATCH] refactor(async): s/fill/fill_exn/g Signed-off-by: Rudi Grinberg --- cohttp-async/src/client.ml | 2 +- cohttp-curl-async/src/cohttp_curl_async.ml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cohttp-async/src/client.ml b/cohttp-async/src/client.ml index c9535416d..364ead168 100644 --- a/cohttp-async/src/client.ml +++ b/cohttp-async/src/client.ml @@ -109,7 +109,7 @@ module Connection = struct req oc >>= fun () -> read_response ic >>= fun (resp, body) -> - Ivar.fill res (resp, `Pipe body); + Ivar.fill_exn res (resp, `Pipe body); (* block starting any more requests until the consumer has finished reading this request *) Pipe.closed body) |> don't_wait_for; diff --git a/cohttp-curl-async/src/cohttp_curl_async.ml b/cohttp-curl-async/src/cohttp_curl_async.ml index e955047cd..c407c54a9 100644 --- a/cohttp-curl-async/src/cohttp_curl_async.ml +++ b/cohttp-curl-async/src/cohttp_curl_async.ml @@ -40,7 +40,7 @@ module Context = struct | None -> () | Some w -> Hashtbl.remove t.wakeners h; - Ivar.fill w code); + Ivar.fill_exn w code); finished s in let on_readable fd = @@ -102,7 +102,7 @@ module Context = struct | Some _, true -> () | None, true -> set_event (Some (create_event fd what)) | Some ivar, false -> - Ivar.fill ivar (); + Ivar.fill_exn ivar (); set_event None in update current.fd @@ -168,7 +168,7 @@ module Request = struct timeout in Cohttp_curl.Request.create ?timeout_ms ?headers method_ ~uri ~input - ~output ~on_response:(Ivar.fill response_ready) + ~output ~on_response:(Ivar.fill_exn response_ready) in { base; response_ready = Ivar.read response_ready; body_ready } end