From 3189e981fc1a178821505307cecd4d34298d16ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Fri, 13 Mar 2015 16:38:48 +0100 Subject: stdlib: Remove obsolete hashmap references in io_lib --- lib/stdlib/src/io_lib.erl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/stdlib') diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl index 24ae83da9c..3378d668a5 100644 --- a/lib/stdlib/src/io_lib.erl +++ b/lib/stdlib/src/io_lib.erl @@ -287,6 +287,8 @@ write([H|T], D) -> end; write(F, _D) when is_function(F) -> erlang:fun_to_list(F); +write(Term, D) when is_map(Term) -> + write_map(Term, D); write(T, D) when is_tuple(T) -> if D =:= 1 -> "{...}"; @@ -295,9 +297,7 @@ write(T, D) when is_tuple(T) -> [write(element(1, T), D-1)| write_tail(tl(tuple_to_list(T)), D-1, $,)], $}] - end; -write(Term, D) when is_map(Term) -> write_map(Term, D); -write(Term, D) -> write_hashmap(Term, D). + end. %% write_tail(List, Depth, CharacterBeforeDots) %% Test the terminating case first as this looks better with depth. @@ -315,9 +315,6 @@ write_port(Port) -> write_ref(Ref) -> erlang:ref_to_list(Ref). -write_hashmap(Map,D) -> - ["#{", write_map_body(hashmap:to_list(Map),D), $}]. - write_map(Map, D) when is_integer(D) -> [$#,${,write_map_body(maps:to_list(Map), D),$}]. -- cgit v1.2.3