summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2025-05-18 17:06:43 +0200
committerMarius Peter <marius.peter@tutanota.com>2025-05-18 17:06:43 +0200
commit4ffdeec8803a63703cbc72437b51126db5f3c5bf (patch)
tree586cb82e8bec5a3571c560341c93bbaa7a5d2c2f
parent6658535cf610d6c1d99dae20e98ced14a920dbb2 (diff)
Consistently use Lwt_result.
-rw-r--r--lib/git_helpers.ml6
1 files 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 :: _ ->
Copyright 2019--2025 Marius PETER