mirror of
https://github.com/processone/ejabberd
synced 2025-10-05 02:29:34 +02:00
Convert code to use Fast YAML
This commit is contained in:
parent
b137ee3beb
commit
0de222d998
3 changed files with 6 additions and 6 deletions
|
@ -589,10 +589,10 @@ rebar_dep({App, _, {git, Url, Ref}}) ->
|
|||
%% -- YAML spec parser
|
||||
|
||||
consult(File) ->
|
||||
case p1_yaml:decode_from_file(File, [plain_as_atom]) of
|
||||
case fast_yaml:decode_from_file(File, [plain_as_atom]) of
|
||||
{ok, []} -> {ok, []};
|
||||
{ok, [Doc|_]} -> {ok, [format(Spec) || Spec <- Doc]};
|
||||
{error, Err} -> {error, p1_yaml:format_error(Err)}
|
||||
{error, Err} -> {error, fast_yaml:format_error(Err)}
|
||||
end.
|
||||
|
||||
format({Key, Val}) when is_binary(Val) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue