Use iolists in collectable for binaries
This commit is contained in:
@@ -85,8 +85,8 @@ defimpl Collectable, for: BitString do
|
||||
|
||||
def into(original) do
|
||||
{original, fn
|
||||
bitstring, {:cont, x} -> <<bitstring :: bits, x :: bits>>
|
||||
bitstring, :done -> bitstring
|
||||
acc, {:cont, x} when is_bitstring(x) -> [acc|x]
|
||||
acc, :done -> IO.iodata_to_binary(acc)
|
||||
_, :halt -> :ok
|
||||
end}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user