Skip to content

Commit 7d7b3d0

Browse files
committed
fixing the dialyzer, travis took too long
1 parent c4e105c commit 7d7b3d0

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ before_script:
2929

3030
script:
3131
- mix test
32-
- not_allowed=(1.3 1.4 1.5)
32+
- not_allowed=(1.3 1.4 1.5 1.6 1.7)
3333
- case "${not_allowed[@]}" in *"${TRAVIS_ELIXIR_VERSION}"*) dialyzer=0 ;; *) dialyzer=1 ;; esac
3434
- if [ "$dialyzer" -eq 1 ]; then mix dialyzer --halt-exit-status; fi
3535

lib/mongo.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ defmodule Mongo do
5656

5757
@timeout 5000
5858

59-
@dialyzer [no_match: [count_documents!: 4]]
59+
#@dialyzer [no_match: [count_documents!: 4]]
6060

6161
@type conn :: DbConnection.Conn
6262
@type collection :: String.t
@@ -336,8 +336,8 @@ defmodule Mongo do
336336

337337
case documents do
338338
[%{"n" => count}] -> {:ok, count}
339-
[] -> {:error, :nothing_returned}
340-
_ -> {:error, :too_many_documents_returned}
339+
[] -> {:error, :nothing_returned}
340+
_ -> {:error, :too_many_documents_returned}
341341
end
342342
end
343343

@@ -523,7 +523,7 @@ defmodule Mongo do
523523
@doc """
524524
Sends a ping command to the server.
525525
"""
526-
@spec ping(GenServer.server) :: result!(BSON.document)
526+
@spec ping(GenServer.server) :: result(BSON.document)
527527
def ping(topology_pid) do
528528
command(topology_pid, %{ping: 1}, [batch_size: 1])
529529
end

lib/mongo/cursor.ex

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,6 @@ defmodule Mongo.Cursor do
100100
Enum.reject(keyword, fn {_key, value} -> is_nil(value) end)
101101
end
102102

103-
defp filter_nils(map) when is_map(map) do
104-
Enum.reject(map, fn {_key, value} -> is_nil(value) end)
105-
|> Enum.into(%{})
106-
end
107-
108103
defp after_fun(opts) do
109104
fn
110105
state(cursor: 0) -> :ok

lib/mongo/monitor.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ defmodule Mongo.Monitor do
7777

7878
@doc false
7979
def handle_call(:check, _from, state) do
80-
check(state)
80+
{_, state, diff} = check(state)
81+
{:reply, diff, state}
8182
end
8283

8384
@doc false

0 commit comments

Comments
 (0)