Skip to content

Commit

Permalink
Fix some dialyzer errors in yz_dt_extractor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Cribbs committed Dec 18, 2013
1 parent 38e37ee commit 04eef4f
Showing 1 changed file with 3 additions and 5 deletions.
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

1 comment on commit 04eef4f

@hazen
Copy link

@hazen hazen commented on 04eef4f Dec 18, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seancribbs When you get back, could you show me how to test this? Cheers!

Please sign in to comment.