Skip to content

Commit

Permalink
Fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
clecat authored and art-w committed Apr 11, 2024
1 parent 9c7be8d commit 8c3de90
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/irmin-pack/io/atomic_write.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/irmin-pack/io/pack_store.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 2 additions & 4 deletions src/irmin/lru.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand All @@ -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

0 comments on commit 8c3de90

Please sign in to comment.