Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace IO.iodata_to_binary/1 with IO.chardata_to_string/1 #426

Merged
merged 1 commit into from
Nov 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/vintage_net/ip/dhcpd_config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ defmodule VintageNet.IP.DhcpdConfig do
"""

config = Enum.map(dhcpd, &to_udhcpd_string/1)
IO.iodata_to_binary([initial, "\n", config, "\n"])
IO.chardata_to_string([initial, "\n", config, "\n"])
end

defp to_udhcpd_string({:start, val}) do
Expand Down
2 changes: 1 addition & 1 deletion lib/vintage_net/ip/dnsd_config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ defmodule VintageNet.IP.DnsdConfig do

defp dnsd_contents(%{records: records}) do
Enum.map(records, &record_to_string/1)
|> IO.iodata_to_binary()
|> IO.chardata_to_string()
end

defp record_to_string({name, ipa}) do
Expand Down
2 changes: 1 addition & 1 deletion test/vintage_net/info_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ defmodule VintageNet.InfoTest do

test "info_as_ansidata can return ansidata" do
output = Info.info_as_ansidata()
output_str = output |> IO.ANSI.format(false) |> IO.iodata_to_binary()
output_str = output |> IO.ANSI.format(false) |> IO.chardata_to_string()

assert output_str =~ "All interfaces"
assert output_str =~ "Available interfaces"
Expand Down
2 changes: 1 addition & 1 deletion test/vintage_net/resolver/resolv_conf_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule VintageNet.Resolver.ResolvConfTest do
defp to_resolvconf(map, additional_name_servers \\ []) do
map
|> ResolvConf.to_config(additional_name_servers)
|> IO.iodata_to_binary()
|> IO.chardata_to_string()
end

test "empty resolvconf is empty" do
Expand Down