Skip to content

Commit 7d1abc2

Browse files
committed
fix wrong merge
Signed-off-by: Alejandro M. Ramallo <[email protected]>
1 parent cde813a commit 7d1abc2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/partisan_opts.erl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@
2020

2121
-module(partisan_opts).
2222

23+
-type t() :: [opt()].
2324
-type opt() :: {timeout, integer()}.
2425

26+
-export_type([t/0]).
27+
28+
2529
-export([get/2]).
2630
-export([take/2]).
2731

@@ -33,17 +37,17 @@
3337
-spec get([opt()], atom()) -> {ok, term()} | error.
3438

3539
get(Opts, Key) when is_list(Opts) ->
36-
case lists:keyfind(Key, 1, Opts0) of
40+
case lists:keyfind(Key, 1, Opts) of
3741
{Key, Val} -> {ok, Val};
3842
false -> error
3943
end.
4044

4145

42-
-spec take([opt()], atom()) -> {ok, {term(), Opts}} | error.
46+
-spec take([opt()], atom()) -> {ok, {term(), list()}} | error.
4347

44-
take(Opts, Key) when is_list(Opts) ->
48+
take(Opts0, Key) when is_list(Opts0) ->
4549
case lists:keytake(Key, 1, Opts0) of
46-
{value, {Key, Val}, Opts} -> {val, Opts};
50+
{value, {Key, Val}, Opts} -> {Val, Opts};
4751
false -> error
4852
end.
4953

0 commit comments

Comments
 (0)