Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Commit

Permalink
Convert single atom options to {Option, true}
Browse files Browse the repository at this point in the history
Fixes JSON serialisation e.g. when a TCP listener has
a single atom property such as "binary" configured.

Fixes #34.
  • Loading branch information
michaelklishin committed Mar 16, 2017
1 parent ff370ed commit e974a39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rabbit_mgmt_format.erl
Expand Up @@ -260,6 +260,9 @@ opts(Opts) ->

opts([], Acc) ->
lists:reverse(Acc);
%% single atom options, e.g. `binary`
opts([Head | Tail], Acc) when is_atom(Head) ->
opts([{Head, true} | Tail], Acc);
%% verify_fun value is a tuple that includes a function
opts([_Head = {verify_fun, _Value} | Tail], Acc) ->
opts(Tail, Acc);
Expand Down

0 comments on commit e974a39

Please sign in to comment.