diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-03-13 16:38:48 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-03-19 14:57:46 +0100 |
commit | 3189e981fc1a178821505307cecd4d34298d16ba (patch) | |
tree | d931446bd469fe7ff7b442110ebe659758856028 | |
parent | 68723bb6cd5bb57b288a4af82dc32acf13de0b4d (diff) | |
download | otp-3189e981fc1a178821505307cecd4d34298d16ba.tar.gz otp-3189e981fc1a178821505307cecd4d34298d16ba.tar.bz2 otp-3189e981fc1a178821505307cecd4d34298d16ba.zip |
stdlib: Remove obsolete hashmap references in io_lib
-rw-r--r-- | lib/stdlib/src/io_lib.erl | 9 |
1 files changed, 3 insertions, 6 deletions
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),$}]. |