Skip to content

Commit

Permalink
Fix various spec errors, according to Gradualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankBro committed Oct 21, 2020
1 parent 58ea081 commit 14976ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/buoy_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

%% public
-spec start() ->
{ok, [atom()]}.
{ok, [atom()]} | {error, term()}.

start() ->
application:ensure_all_started(?APP).
Expand Down
8 changes: 4 additions & 4 deletions src/buoy_pool.erl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

%% public
-spec init() ->
ok.
ok | error().

init() ->
foil:new(?MODULE),
Expand All @@ -38,7 +38,7 @@ start(Url) ->
start(Url, ?DEFAULT_POOL_OPTIONS).

-spec start(buoy_url(), options()) ->
ok | {error, pool_already_started | buoy_not_started}.
ok | {error, pool_already_started | buoy_not_started} | error().

start(#buoy_url {
protocol = Protocol,
Expand All @@ -62,7 +62,7 @@ start(#buoy_url {
end.

-spec stop(buoy_url()) ->
ok | {error, pool_not_started | buoy_not_started}.
ok | {error, pool_not_started | buoy_not_started} | error().

stop(#buoy_url {
protocol = Protocol,
Expand All @@ -83,7 +83,7 @@ stop(#buoy_url {
end.

-spec terminate() ->
ok.
ok | error().

terminate() ->
foil:delete(?MODULE).
Expand Down
4 changes: 2 additions & 2 deletions src/buoy_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
]).

%% public
-spec start_link() ->
{ok, pid()}.
% Wrong but can't be corrected until OTP exports startlink_ret() (OTP 23)
% -spec start_link() -> {ok, pid()}.

start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
Expand Down

0 comments on commit 14976ae

Please sign in to comment.