From 4ffdeec8803a63703cbc72437b51126db5f3c5bf Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sun, 18 May 2025 17:06:43 +0200 Subject: Consistently use Lwt_result. --- lib/git_helpers.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/git_helpers.ml b/lib/git_helpers.ml index ed917a8..845ee6b 100644 --- a/lib/git_helpers.ml +++ b/lib/git_helpers.ml @@ -34,8 +34,8 @@ module Commit = struct author = Store.Value.Commit.author c; message = Store.Value.Commit.message c; } - | Ok _ -> Lwt.return_error (`Msg "object is not a commit") - | Error e -> Lwt.return_error e + | Ok _ -> Lwt_result.fail (`Msg "object is not a commit") + | Error e -> Lwt_result.fail e let recent_commits repo_path n = let open Lwt_result.Syntax in @@ -45,7 +45,7 @@ module Commit = struct if count = 0 then Lwt_result.return (List.rev acc) else of_hash store hash >>= function - | Error e -> Lwt.return_error e + | Error e -> Lwt_result.fail e | Ok commit -> ( match commit.parents with | parent :: _ -> -- cgit v1.2.3