aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/io_lib.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-03-13 16:38:48 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-03-19 14:57:46 +0100
commit3189e981fc1a178821505307cecd4d34298d16ba (patch)
treed931446bd469fe7ff7b442110ebe659758856028 /lib/stdlib/src/io_lib.erl
parent68723bb6cd5bb57b288a4af82dc32acf13de0b4d (diff)
downloadotp-3189e981fc1a178821505307cecd4d34298d16ba.tar.gz
otp-3189e981fc1a178821505307cecd4d34298d16ba.tar.bz2
otp-3189e981fc1a178821505307cecd4d34298d16ba.zip
stdlib: Remove obsolete hashmap references in io_lib
Diffstat (limited to 'lib/stdlib/src/io_lib.erl')
-rw-r--r--lib/stdlib/src/io_lib.erl9
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),$}].