Remove an assert false and return an error instead of

This commit is contained in:
Romain Calascibetta 2022-09-21 12:02:19 +02:00
parent 2ef62f3307
commit ad09080ee6

View file

@ -132,7 +132,7 @@ let get t key =
| Some blob -> | Some blob ->
Store.read_exn t.store blob >|= function Store.read_exn t.store blob >|= function
| Blob b -> Ok (Git.Blob.to_string b) | Blob b -> Ok (Git.Blob.to_string b)
| _ -> assert false | _ -> Error (`Value_expected key)
let get_partial t key ~offset ~length = let get_partial t key ~offset ~length =
let open Lwt_result.Infix in let open Lwt_result.Infix in