diff --git a/src/irmin-pack/io/atomic_write.ml b/src/irmin-pack/io/atomic_write.ml index a430955fe8..b309d1570e 100644 --- a/src/irmin-pack/io/atomic_write.ml +++ b/src/irmin-pack/io/atomic_write.ml @@ -2,14 +2,14 @@ open Import include Irmin_pack.Atomic_write module Table (K : Irmin.Type.S) = struct - module K = (struct + module K = struct include K type t = K.t [@@deriving irmin ~short_hash ~equal] let hash = short_hash ?seed:None let equal = Irmin.Type.(unstage (equal K.t)) - end) + end include Kcas_data.Hashtbl diff --git a/src/irmin-pack/io/pack_store.ml b/src/irmin-pack/io/pack_store.ml index acfa41d3fc..bb80bbc2c0 100644 --- a/src/irmin-pack/io/pack_store.ml +++ b/src/irmin-pack/io/pack_store.ml @@ -25,12 +25,12 @@ let invalid_read fmt = Fmt.kstr (fun s -> raise (Invalid_read s)) fmt let corrupted_store fmt = Fmt.kstr (fun s -> raise (Corrupted_store s)) fmt module Table (K : Irmin.Hash.S) = struct - module K = (struct + module K = struct include K let hash = short_hash let equal = Irmin.Type.(unstage (equal K.t)) - end) + end include Kcas_data.Hashtbl diff --git a/src/irmin/lru.ml b/src/irmin/lru.ml index bd63a1477f..4938c6f2f0 100644 --- a/src/irmin/lru.ml +++ b/src/irmin/lru.ml @@ -137,8 +137,7 @@ module Make (H : Hashtbl.HashedType) = struct | Some v -> promote ~xt t v; snd v.value - | None -> - raise Not_found + | None -> raise Not_found in Xt.commit { tx } @@ -160,6 +159,5 @@ module Make (H : Hashtbl.HashedType) = struct in Xt.commit { tx } - let iter t f = - HT.iter (fun k q -> f k (snd q.Q.value)) t.ht + let iter t f = HT.iter (fun k q -> f k (snd q.Q.value)) t.ht end