Permalink
Browse files

dialyzer: luwak fixes

  • Loading branch information...
1 parent 1eb688a commit 011734f288b76d754ecb3b46a2b466f8bb46b78f @argv0 argv0 committed Apr 4, 2011
Showing with 6 additions and 2 deletions.
  1. +2 −1 src/luwak_block.erl
  2. +4 −1 src/luwak_tree.erl
View
@@ -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) ->
View
@@ -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};

0 comments on commit 011734f

Please sign in to comment.