Add fastfix for pack function return types

This commit is contained in:
Dmitry Manik 2017-02-20 19:00:49 +03:00
parent a1e015d351
commit 640fea4c60

View File

@ -86,10 +86,10 @@ binary_to_term(Bin, Opt) ->
%% @doc Encode an erlang term into an msgpack binary.
%% Returns {error, {badarg, term()}} if the input is illegal.
-spec pack(msgpack:object()) -> binary() | {error, {badarg, term()}}.
-spec pack(msgpack:object()) -> binary() | {error, _}.
pack(Term) -> msgpack:pack(Term, []).
-spec pack(msgpack:object(), msgpack:options()) -> binary().
-spec pack(msgpack:object(), msgpack:options()) -> binary() | {error, _}.
pack(Term, Opts) ->
Option = parse_options(Opts),
try