Browse Source

Fix dialyzer.

Roberto Ostinelli 4 years ago
parent
commit
4bfaed7125
3 changed files with 8 additions and 6 deletions
  1. 4 2
      src/syn.hrl
  2. 2 2
      src/syn_groups.erl
  3. 2 2
      src/syn_registry.erl

+ 4 - 2
src/syn.hrl

@@ -25,8 +25,10 @@
 %% ==========================================================================================================
 %% types
 -type syn_registry_entry() :: {
-    Name :: any(),
-    Pid :: pid(),
+    {
+        Name :: any(),
+        Pid :: pid()
+    },
     Meta :: any(),
     Time :: integer(),
     MonitorRef :: undefined | reference(),

+ 2 - 2
src/syn_groups.erl

@@ -429,13 +429,13 @@ code_change(_OldVsn, State, _Extra) ->
 %% ===================================================================
 %% Internal
 %% ===================================================================
--spec multicast_join(GroupName :: any(), Pid :: pid(), Meta :: any(), #state{}) -> pid().
+-spec multicast_join(GroupName :: any(), Pid :: pid(), Meta :: any(), #state{}) -> any().
 multicast_join(GroupName, Pid, Meta, #state{
     multicast_pid = MulticastPid
 }) ->
     MulticastPid ! {multicast_join, GroupName, Pid, Meta}.
 
--spec multicast_leave(GroupName :: any(), Pid :: pid(), #state{}) -> pid().
+-spec multicast_leave(GroupName :: any(), Pid :: pid(), #state{}) -> any().
 multicast_leave(GroupName, Pid, #state{
     multicast_pid = MulticastPid
 }) ->

+ 2 - 2
src/syn_registry.erl

@@ -466,13 +466,13 @@ code_change(_OldVsn, State, _Extra) ->
     Time :: integer(),
     Force :: boolean(),
     #state{}
-) -> pid().
+) -> any().
 multicast_register(Name, Pid, Meta, Time, Force, #state{
     multicast_pid = MulticastPid
 }) ->
     MulticastPid ! {multicast_register, Name, Pid, Meta, Time, Force}.
 
--spec multicast_unregister(Name :: any(), Pid :: pid(), #state{}) -> pid().
+-spec multicast_unregister(Name :: any(), Pid :: pid(), #state{}) -> any().
 multicast_unregister(Name, Pid, #state{
     multicast_pid = MulticastPid
 }) ->