Skip to content

Commit

Permalink
Dialyzer spec fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentdephily committed Nov 4, 2016
1 parent 67b4f92 commit bc3c6ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/cberl.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
connected :: true | false,
opts :: list()}).

-type key() :: string().
-type key() :: binary().
-type value() :: string() | list() | integer() | binary().
-type operation_type() :: add | replace | set | append | prepend.
-type instance() :: #instance{}.
Expand Down
6 changes: 3 additions & 3 deletions src/cberl.erl
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ store(PoolPid, Op, Key, Value, TranscoderOpts, Exp, Cas) ->
%% Key the key to get
%% Exp When the object should expire
%% pass a negative number for infinity
-spec mget(pid(), [key()], integer()) -> list().
-spec mget(pid(), [key()], integer()) -> list() | {error, _}.
mget(PoolPid, Keys, Exp) ->
execute(PoolPid, {mget, Keys, Exp, 0}).

Expand All @@ -232,7 +232,7 @@ mget(PoolPid, Keys, Exp) ->
%% HashKey the key to use for hashing
%% Key the key to get
%% Exp When the lock should expire
-spec getl(pid(), key(), integer()) -> list().
-spec getl(pid(), key(), integer()) -> list() | {error, _}.
getl(PoolPid, Key, Exp) ->
execute(PoolPid, {mget, [Key], Exp, 1}).

Expand Down Expand Up @@ -297,7 +297,7 @@ handle_flush_result(PoolPid, FlushMarker, Result={ok, 201, _}) ->
%% Method HTTP method
%% Type Couchbase request type
-spec http(pid(), string(), string(), string(), http_method(), http_type())
-> {ok, binary()} | {error, _}.
-> {ok, integer(), binary()} | {error, _}.
http(PoolPid, Path, Body, ContentType, Method, Type) ->
execute(PoolPid, {http, Path, Body, ContentType, http_method(Method), http_type(Type)}).

Expand Down

0 comments on commit bc3c6ad

Please sign in to comment.