Stdlib: reintroduce MBytes.pp_hex

This commit is contained in:
Grégoire Henry 2018-05-13 20:20:27 +02:00 committed by Benjamin Canou
parent 8986640a98
commit cb28ca1cd5
2 changed files with 5 additions and 0 deletions

View File

@ -27,3 +27,7 @@ let to_hex t =
let of_hex hex =
Cstruct.to_bigarray (Hex.to_cstruct hex)
let pp_hex ppf s =
let `Hex hex = to_hex s in
Format.pp_print_string ppf hex

View File

@ -21,3 +21,4 @@ module LE : EndianBigstring.EndianBigstringSig
val make : int -> char -> t
val of_hex : Hex.t -> t
val to_hex : t -> Hex.t
val pp_hex : Format.formatter -> t -> unit