Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some dialyzer errors in yz_dt_extractor. #255

Merged
merged 1 commit into from
Dec 18, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/yz_dt_extractor.erl
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,8 @@ extract(Value0, Opts) ->

-spec extract_fields(#crdt{}, state()) -> fields().
extract_fields(#crdt{mod=Mod, value=Data}, S) ->
case extract_fields(undefined, riak_kv_crdt:from_mod(Mod), Mod:value(Data), S) of
#state{fields=F} -> F;
Err -> Err
end.
#state{fields=F} = extract_fields(undefined, riak_kv_crdt:from_mod(Mod), Mod:value(Data), S),
F.

-spec extract_fields(field_path_name(), datatype(), term(), state()) -> state().
extract_fields(Name0, map, Pairs, #state{field_separator=Sep}=State) ->
Expand All @@ -110,7 +108,7 @@ extract_fields(Name, flag, Value, #state{fields=Fields, field_separator=Sep}=Sta
FieldName = field_name(Name, flag, Sep),
State#state{fields=[{FieldName, Value}|Fields]}.

-spec field_name(field_path_name(), datatype(), binary()) -> binary().
-spec field_name(field_path_name(), datatype(), binary()) -> undefined | binary().
field_name(undefined, map, _Sep) ->
undefined;
field_name(undefined, Type, _Sep) ->
Expand Down