From faeae964fc209804d581b91df45ff8c464fd287e Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Sat, 14 Dec 2019 14:25:38 -0600 Subject: [PATCH] fix(pp): improve printing of hashtables close #243 --- src/core/CCHashtbl.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/CCHashtbl.ml b/src/core/CCHashtbl.ml index 4bd301bd..39fa57a3 100644 --- a/src/core/CCHashtbl.ml +++ b/src/core/CCHashtbl.ml @@ -129,13 +129,12 @@ module Poly = struct let first = ref true in Hashtbl.iter (fun k v -> - if !first then first := false else Format.pp_print_string fmt ", "; + if !first then first := false else Format.fprintf fmt ",@ "; pp_k fmt k; Format.pp_print_string fmt " -> "; pp_v fmt v; - Format.pp_print_cut fmt () ) m; - Format.fprintf fmt "}@]" + Format.fprintf fmt "@,}@]" end include Poly