Skip to content

Commit

Permalink
Fix dialyzer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaturan committed Sep 8, 2018
1 parent 5a6a752 commit 05cdd06
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Add questions section
- Change default `@eb_tme_unit` to `:microsecond`
- Change all instances of `micro_seconds` and `microseconds` to `microsecond`, as per Erlang 19+
- Fix dialyzer warnings

## [1.3.X]

Expand Down
2 changes: 1 addition & 1 deletion lib/event_bus/managers/observation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ defmodule EventBus.Manager.Observation do
@doc """
Create an watcher
"""
@spec create(tuple()) :: no_return()
@spec create(tuple()) :: :ok
def create({listeners, {topic, id}}) do
GenServer.call(__MODULE__, {:save, {topic, id}, {listeners, [], []}})
end
Expand Down
4 changes: 3 additions & 1 deletion lib/event_bus/services/notification.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ defmodule EventBus.Service.Notification do

@spec notify_listeners(list(), tuple()) :: no_return()
defp notify_listeners(listeners, event_shadow) do
for listener <- listeners, do: notify_listener(listener, event_shadow)
Enum.each(listeners, fn listener ->
notify_listener(listener, event_shadow)
end)
end

@spec notify_listener(tuple(), tuple()) :: no_return()
Expand Down
9 changes: 7 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ defmodule EventBus.Mixfile do
[extra_applications: [:logger], mod: {EventBus.Application, []}]
end

defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp elixirc_paths(:test) do
["lib", "test/support"]
end

defp elixirc_paths(_) do
["lib"]
end

# Dependencies can be Hex packages:
#
Expand Down

0 comments on commit 05cdd06

Please sign in to comment.