Skip to content

Commit f0e1443

Browse files
author
José Valim
committed
Use iodata_to_binary in join/2 and map_join/3
Everything is previously converted to a string using the String.Chars protocol, so we can just treat it as iodata.
1 parent cf61958 commit f0e1443

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/elixir/lib/enum.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ defmodule Enum do
943943
if reduced == :first do
944944
""
945945
else
946-
IO.chardata_to_string reduced
946+
IO.iodata_to_binary reduced
947947
end
948948
end
949949

@@ -1003,7 +1003,7 @@ defmodule Enum do
10031003
if reduced == :first do
10041004
""
10051005
else
1006-
IO.chardata_to_string reduced
1006+
IO.iodata_to_binary reduced
10071007
end
10081008
end
10091009

0 commit comments

Comments
 (0)