diff --git a/lib/ex_aws/dynamo/decoder.ex b/lib/ex_aws/dynamo/decoder.ex index bd822d5..60ee7e8 100644 --- a/lib/ex_aws/dynamo/decoder.ex +++ b/lib/ex_aws/dynamo/decoder.ex @@ -69,7 +69,7 @@ defmodule ExAws.Dynamo.Decoder do @doc "Converts a map with binary keys to the specified struct" def binary_map_to_struct(bmap, module) do - module.__struct__ + module.__struct__() |> Map.from_struct() |> Enum.reduce(%{}, fn {k, v}, map -> Map.put(map, k, Map.get(bmap, Atom.to_string(k), v)) diff --git a/test/support/ddb_local.ex b/test/support/ddb_local.ex index d776e8b..2b1bb5e 100644 --- a/test/support/ddb_local.ex +++ b/test/support/ddb_local.ex @@ -21,7 +21,7 @@ defmodule DDBLocal do if is_nil(port) do {:error, "No value provided for :port in config/ddb_local_test.exs."} else - case :gen_tcp.connect('localhost', port, []) do + case :gen_tcp.connect(~c"localhost", port, []) do {:ok, _} -> :ok {:error, error} -> {:error, error} end