summaryrefslogtreecommitdiff
path: root/src/amqqueue.erl
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2020-05-19 15:23:13 +0200
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2020-05-19 15:23:13 +0200
commit12d5f16547a1e9a18d6e144103ead2e8108d7e95 (patch)
tree5409f2da1ad9804b63e059cb86b11555fd19cfb0 /src/amqqueue.erl
parentd9e3d7e8acaf407904924685e76ecb53f8398c95 (diff)
downloadrabbitmq-server-git-12d5f16547a1e9a18d6e144103ead2e8108d7e95.tar.gz
Fix several type specs
The most significant one is the type spec of `gm_pids` in the amqqueue records. I'm surprised Dialyzer didn't say anything about it. However it was reported by Dialyzer in `v3.7.x`.
Diffstat (limited to 'src/amqqueue.erl')
-rw-r--r--src/amqqueue.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/amqqueue.erl b/src/amqqueue.erl
index 98c666e78e..7f3607a9d5 100644
--- a/src/amqqueue.erl
+++ b/src/amqqueue.erl
@@ -111,7 +111,7 @@
%% implicit
%% update
%% as above
- gm_pids = [] :: [{pid(), pid()} | pid()] | none | '_', %% transient
+ gm_pids = [] :: [{pid(), pid()}] | none | '_', %% transient
decorators :: [atom()] | none | undefined | '_', %% transient,
%% recalculated
%% as above
@@ -137,7 +137,7 @@
recoverable_slaves :: [atom()] | none,
policy :: binary() | none | undefined,
operator_policy :: binary() | none | undefined,
- gm_pids :: [pid()] | none,
+ gm_pids :: [{pid(), pid()}] | none,
decorators :: [atom()] | none | undefined,
state :: atom() | none,
policy_version :: non_neg_integer(),
@@ -438,14 +438,14 @@ get_exclusive_owner(Queue) ->
% gm_pids
--spec get_gm_pids(amqqueue()) -> [{pid(), pid()} | pid()] | none.
+-spec get_gm_pids(amqqueue()) -> [{pid(), pid()}] | none.
get_gm_pids(#amqqueue{gm_pids = GMPids}) ->
GMPids;
get_gm_pids(Queue) ->
amqqueue_v1:get_gm_pids(Queue).
--spec set_gm_pids(amqqueue(), [{pid(), pid()} | pid()] | none) -> amqqueue().
+-spec set_gm_pids(amqqueue(), [{pid(), pid()}] | none) -> amqqueue().
set_gm_pids(#amqqueue{} = Queue, GMPids) ->
Queue#amqqueue{gm_pids = GMPids};