Skip to content

Commit

Permalink
dialyzer: luwak fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
argv0 committed Apr 4, 2011
1 parent 1eb688a commit 011734f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/luwak_block.erl
Expand Up @@ -14,7 +14,8 @@ create(Riak, Data) ->
],
Obj = riak_object:new(?N_BUCKET, skerl:hexhash(?HASH_LEN, Data), Value),
Riak:put(Obj, 2, 2, ?TIMEOUT_DEFAULT, [{returnbody, true}]).


-spec data(list() | riak_object:riak_object()) -> binary().
data(Val) when is_list(Val) ->
proplists:get_value(data, Val);
data(Object) ->
Expand Down
5 changes: 4 additions & 1 deletion src/luwak_tree.erl
Expand Up @@ -242,7 +242,10 @@ list_into_nodes(Riak, Children, Order, StartingPos) ->
end.

%% @spec block_at(Riak::riak(), File::luwak_file(), Pos::int()) ->
%% {ok, BlockObj} | {error, Reason}
%% {ok, BlockObj::riak_object:riak_object()} | {error, Reason}
-spec block_at(term(), term(), non_neg_integer()) ->
{ok, BlockObj::riak_object:riak_object()} |
{ok, undefined} | {error, Reason::term()}.
block_at(Riak, File, Pos) ->
case luwak_file:get_property(File, root) of
undefined -> {error, notfound};
Expand Down

0 comments on commit 011734f

Please sign in to comment.