Skip to content

Commit 0d9bed1

Browse files
authored
Merge pull request #42 from woylie/patch-1
replace deprecated functions
2 parents dc0ac39 + 1d4792c commit 0d9bed1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/tds/protocol.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ defmodule Tds.Protocol do
121121

122122
defp instance(opts, s) do
123123
host = Keyword.fetch!(opts, :hostname)
124-
host = if is_binary(host), do: String.to_char_list(host), else: host
124+
host = if is_binary(host), do: String.to_charlist(host), else: host
125125

126126
case :gen_udp.open(0, [:binary, {:active, false}, {:reuseaddr, true}]) do
127127
{:ok, sock} ->
@@ -135,7 +135,7 @@ defmodule Tds.Protocol do
135135

136136
defp connect(opts, s) do
137137
host = Keyword.fetch!(opts, :hostname)
138-
host = if is_binary(host), do: String.to_char_list(host), else: host
138+
host = if is_binary(host), do: String.to_charlist(host), else: host
139139
port = s.itcp || opts[:port] || System.get_env("MSSQLPORT") || 1433
140140
{port, _} = if is_binary(port), do: Integer.parse(port), else: {port, nil}
141141
timeout = opts[:timeout] || @timeout

0 commit comments

Comments
 (0)