Skip to content

Commit 62185c8

Browse files
committed
Remove dialyzer warnings
1 parent ef94ee6 commit 62185c8

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/mod_private_mnesia.erl

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,23 +111,19 @@ del_data(LUser, LServer, NS) ->
111111

112112
-spec get_users_with_data(binary(), binary()) -> {ok, [binary()]} | {error, any()}.
113113
get_users_with_data(LServer, NS) ->
114-
case mnesia:dirty_select(private_storage,
114+
Val = mnesia:dirty_select(private_storage,
115115
[{#private_storage{usns =
116116
{'$1',
117117
LServer,
118118
NS},
119119
_ = '_'},
120-
[], ['$1']}]) of
121-
Val when is_list(Val) -> {ok, Val};
122-
_ -> {error, db_failure}
123-
end.
120+
[], ['$1']}]),
121+
{ok, Val}.
124122

125123
-spec count_users_with_data(binary(), binary()) -> {ok, integer()} | {error, any()}.
126124
count_users_with_data(LServer, NS) ->
127-
case get_users_with_data(LServer, NS) of
128-
{ok, Val} -> {ok, length(Val)};
129-
Err -> Err
130-
end.
125+
{ok, Val} = get_users_with_data(LServer, NS),
126+
{ok, length(Val)}.
131127

132128
import(LServer, <<"private_storage">>,
133129
[LUser, XMLNS, XML, _TimeStamp]) ->

0 commit comments

Comments
 (0)