Skip to content

Commit

Permalink
Merge pull request dynamo#119 from bbrietzke/to_string_from_binary
Browse files Browse the repository at this point in the history
Updating for deprecation of to_binary in some scenarios.
  • Loading branch information
José Valim committed Aug 22, 2013
2 parents c1295b1 + 723c836 commit 33c1a07
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/dynamo/connection/behaviour.ex
Expand Up @@ -295,7 +295,7 @@ defmodule Dynamo.Connection.Behaviour do

@doc false
def put_resp_header(key, value, connection(resp_headers: resp_headers) = conn) do
connection(conn, resp_headers: Binary.Dict.put(resp_headers, key, to_binary(value)))
connection(conn, resp_headers: Binary.Dict.put(resp_headers, key, to_string(value)))
end

@doc false
Expand Down
2 changes: 1 addition & 1 deletion lib/dynamo/cowboy.ex
Expand Up @@ -71,7 +71,7 @@ defmodule Dynamo.Cowboy do
dispatch = :cowboy_router.compile(options[:dispatch] || dispatch_for(main))
options = Enum.reduce [:acceptors, :dispatch], options, Keyword.delete(&2, &1)

ref = Module.concat(main, kind |> to_binary |> String.upcase)
ref = Module.concat(main, kind |> to_string |> String.upcase)
apply(:cowboy, :"start_#{kind}", [ref, acceptors, options, [env: [dispatch: dispatch]]])
end

Expand Down
2 changes: 1 addition & 1 deletion lib/dynamo/router/utils.ex
Expand Up @@ -7,7 +7,7 @@ defmodule Dynamo.Router.Utils do
Convert a given verb to its connection representation.
"""
def normalize_verb(verb) do
String.upcase(to_binary(verb))
String.upcase(to_string(verb))
end

@doc """
Expand Down

0 comments on commit 33c1a07

Please sign in to comment.