Skip to content

Commit

Permalink
fixing some quick style issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Blowers committed Jun 7, 2017
1 parent 4cc3c28 commit 6f46c7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/mssqlex/odbc.ex
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,6 @@ defmodule Mssqlex.ODBC do
:odbc.disconnect(state)
end

defp handle_errors({:error, reason}), do: {:error, reason |> Error.exception}
defp handle_errors({:error, reason}), do: {:error, Error.exception(reason)}
defp handle_errors(term), do: term
end
2 changes: 1 addition & 1 deletion lib/mssqlex/protocol.ex
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ defmodule Mssqlex.Protocol do

@doc false
@spec disconnect(err :: Exception.t, state) :: :ok
def disconnect(_err, state = %{pid: pid}) do
def disconnect(_err, %{pid: pid} = state) do
case ODBC.disconnect(pid) do
:ok -> :ok
{:error, reason} -> {:error, reason, state}
Expand Down
4 changes: 2 additions & 2 deletions test/mssqlex/types_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule Mssqlex.TypesTest do
test "nchar with preserved encoding", %{pid: pid} do
expected = :unicode.characters_to_binary("e→ø",
:unicode, {:utf16, :little})
assert {_query, %Result{columns: ["test"], rows: [[ ^expected ]]}} =
assert {_query, %Result{columns: ["test"], rows: [[^expected]]}} =
act(pid, "nchar(3)", ["e→ø"], [preserve_encoding: true])
end

Expand All @@ -46,7 +46,7 @@ defmodule Mssqlex.TypesTest do
test "nvarchar with preserved encoding", %{pid: pid} do
expected = :unicode.characters_to_binary("e→ø",
:unicode, {:utf16, :little})
assert {_query, %Result{columns: ["test"], rows: [[ ^expected ]]}} =
assert {_query, %Result{columns: ["test"], rows: [[^expected]]}} =
act(pid, "nvarchar(3)", ["e→ø"], [preserve_encoding: true])
end

Expand Down

0 comments on commit 6f46c7c

Please sign in to comment.