Skip to content

Commit 49e107a

Browse files
authored
Merge pull request #30 from hannesm/key-binary
Mirage_kv.Key.pp: escape binary keys appropriately
2 parents fd680d7 + af37ad0 commit 49e107a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mirage_kv.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ module Key = struct
3939
let parent = function | _::tl -> tl | [] -> []
4040
let compare = compare
4141
let equal = (=)
42-
let pp ppf l = Fmt.pf ppf "/%a" Fmt.(list ~sep:(any "/") string) (List.rev l)
43-
let to_string = Fmt.to_to_string pp
42+
let pp ppf l = Fmt.(any "/" ++ (list ~sep:(any "/") Dump.string)) ppf (List.rev l)
43+
let to_string k = "/" ^ String.concat "/" (List.rev k)
4444
end
4545

4646
type key = Key.t

0 commit comments

Comments
 (0)