Skip to content

Commit

Permalink
Merge pull request #120 from tt/address-deprecations
Browse files Browse the repository at this point in the history
Address deprecations
  • Loading branch information
parroty authored Sep 11, 2017
2 parents d34cdad + efbb896 commit 6d7dc58
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions lib/exvcr/adapter/httpc/converter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule ExVCR.Adapter.Httpc.Converter do
response =
if response.status_code do
status_code = response.status_code
|> Enum.map(&convert_string_to_char_list/1)
|> Enum.map(&convert_string_to_charlist/1)
|> List.to_tuple
%{response | status_code: status_code}
else
Expand All @@ -30,7 +30,7 @@ defmodule ExVCR.Adapter.Httpc.Converter do
if is_map(response.headers) do
headers = response.headers
|> Map.to_list
|> Enum.map(fn({k,v}) -> {to_char_list(k), to_char_list(v)} end)
|> Enum.map(fn({k,v}) -> {to_charlist(k), to_charlist(v)} end)
%{response | headers: headers}
else
response
Expand All @@ -39,9 +39,9 @@ defmodule ExVCR.Adapter.Httpc.Converter do
response
end

defp convert_string_to_char_list(elem) do
defp convert_string_to_charlist(elem) do
if is_binary(elem) do
to_char_list(elem)
to_charlist(elem)
else
elem
end
Expand Down
2 changes: 1 addition & 1 deletion lib/exvcr/adapter/ibrowse.ex
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ defmodule ExVCR.Adapter.IBrowse do
else
status_code = case response.status_code do
integer when is_integer(integer) ->
Integer.to_char_list(integer)
Integer.to_charlist(integer)
char_list when is_list(char_list) ->
char_list
end
Expand Down
4 changes: 2 additions & 2 deletions lib/exvcr/adapter/ibrowse/converter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule ExVCR.Adapter.IBrowse.Converter do

response =
if response.status_code do
%{response | status_code: Integer.to_char_list(response.status_code)}
%{response | status_code: Integer.to_charlist(response.status_code)}
else
response
end
Expand All @@ -28,7 +28,7 @@ defmodule ExVCR.Adapter.IBrowse.Converter do
if is_map(response.headers) do
headers = response.headers
|> Map.to_list
|> Enum.map(fn({k,v}) -> {to_char_list(k), to_char_list(v)} end)
|> Enum.map(fn({k,v}) -> {to_charlist(k), to_charlist(v)} end)
%{response | headers: headers}
else
response
Expand Down

0 comments on commit 6d7dc58

Please sign in to comment.