diff options
author | Francesco Mazzoli <francesco@rabbitmq.com> | 2012-05-01 16:11:21 +0100 |
---|---|---|
committer | Francesco Mazzoli <francesco@rabbitmq.com> | 2012-05-01 16:11:21 +0100 |
commit | c087bab8b9de0d99c7db40c7d786cdb776e44d67 (patch) | |
tree | 25f22b4bbfb3d417334481db5c6c03808a645f99 | |
parent | 2ddeee16341cd53a06c0a3f74ac20346558f0655 (diff) | |
download | rabbitmq-server-c087bab8b9de0d99c7db40c7d786cdb776e44d67.tar.gz |
Removed unused types, added dummy -spec to silence compiler
-rw-r--r-- | src/rabbit_backing_queue.erl | 2 | ||||
-rw-r--r-- | src/rabbit_variable_queue.erl | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/rabbit_backing_queue.erl b/src/rabbit_backing_queue.erl index 28c57bb0..dc144a0e 100644 --- a/src/rabbit_backing_queue.erl +++ b/src/rabbit_backing_queue.erl @@ -26,10 +26,8 @@ ('empty' | %% Message, IsDelivered, AckTag, Remaining_Len {rabbit_types:basic_message(), boolean(), Ack, non_neg_integer()})). --type(is_durable() :: boolean()). -type(attempt_recovery() :: boolean()). -type(purged_msg_count() :: non_neg_integer()). --type(confirm_required() :: boolean()). -type(async_callback() :: fun ((atom(), fun ((atom(), state()) -> state())) -> 'ok')). -type(duration() :: ('undefined' | 'infinity' | number())). diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index 49892eb3..c97832ef 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -334,9 +334,11 @@ count :: non_neg_integer(), end_seq_id :: non_neg_integer() }). -%% The compiler (rightfully) complains that ack() and state() are unused. The -%% problem here is that we can't parametrise the BQ behaviour by these two types -%% as we would like to. We still leave these here for documentation purposes. +%% The compiler (rightfully) complains that ack() and state() are unused. For +%% this reason I added a -spec with the only intent being to remove +%% warnings. The problem here is that we can't parametrise the BQ behaviour by +%% these two types as we would like to. We still leave these here for +%% documentation purposes. -type(ack() :: seq_id()). -type(state() :: #vqstate { q1 :: ?QUEUE:?QUEUE(), @@ -371,6 +373,8 @@ ack_out_counter :: non_neg_integer(), ack_in_counter :: non_neg_integer(), ack_rates :: rates() }). +%% Dummy -spec +-spec(ack/2 :: ([ack()], state()) -> {[rabbit_guid:guid()], state()}). -spec(multiple_routing_keys/0 :: () -> 'ok'). |