Skip to content

Commit

Permalink
quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlobaron committed Apr 11, 2012
1 parent 981f0bd commit 6b628f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/riak_mongo_bson.erl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
-module(riak_mongo_bson).

%-export([encode_bson/1, decode_bson/2]).
-export([encode_bson/1]).
-export([decode_bson/1]).

-include_lib("bson/include/bson_binary.hrl").

Expand All @@ -33,7 +33,7 @@ decode_bson(<<?get_int32(N), RawBson/binary>>) ->
<<DB:S/binary, 0:8, _Rest/binary>> = RawBson,
RawStruct = do_fields(DB),
[ID] = [V || {K, V} <- RawStruct, K =:= <<"_id">>],
{ID, {struct, RawStruct}}.
{term_to_binary(ID), {struct, RawStruct}}.

do_fields(<<>>) -> [];
do_fields(B) ->
Expand Down

0 comments on commit 6b628f3

Please sign in to comment.