Skip to content

Commit 73a4503

Browse files
mnishiguchiFrank Hunleth
authored andcommitted
Replace IO.iodata_to_binary/1 with IO.chardata_to_string/1
1 parent 38a787f commit 73a4503

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/delux/program.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ defmodule Delux.Program do
4040
"""
4141
@spec text_description(t()) :: String.t()
4242
def text_description(%__MODULE__{} = pattern) do
43-
pattern.description |> IO.ANSI.format(false) |> IO.iodata_to_binary()
43+
pattern.description |> IO.ANSI.format(false) |> IO.chardata_to_string()
4444
end
4545

4646
@doc """

test/delux/rgb_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ defmodule Delux.RGBTest do
4646
defp ansidata_to_binary(ansidata, color?) do
4747
ansidata
4848
|> IO.ANSI.format(color?)
49-
|> IO.iodata_to_binary()
49+
|> IO.chardata_to_string()
5050
end
5151
end

test/delux_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ defmodule DeluxTest do
252252
end
253253

254254
defp info_as_binary(pid, indicator \\ :default) do
255-
Delux.info_as_ansidata(pid, indicator) |> IO.ANSI.format(false) |> IO.iodata_to_binary()
255+
Delux.info_as_ansidata(pid, indicator) |> IO.ANSI.format(false) |> IO.chardata_to_string()
256256
end
257257

258258
@tag :tmp_dir
@@ -288,7 +288,7 @@ defmodule DeluxTest do
288288
end
289289

290290
defp singleton_info_as_binary() do
291-
Delux.info_as_ansidata() |> IO.ANSI.format(false) |> IO.iodata_to_binary()
291+
Delux.info_as_ansidata() |> IO.ANSI.format(false) |> IO.chardata_to_string()
292292
end
293293

294294
@tag :tmp_dir

0 commit comments

Comments
 (0)