Fixed dialyzer warning about estap:format_info().
authorStanislaw Klekot <dozzie@jarowit.net>
Thu, 18 Jun 2015 16:52:46 +0000 (18:52 +0200)
committerStanislaw Klekot <dozzie@jarowit.net>
Thu, 18 Jun 2015 16:52:46 +0000 (18:52 +0200)
src/estap.erl

index a1b3a5a..6c63786 100644 (file)
@@ -321,14 +321,14 @@ info(Message, Info) ->
 %% @doc Format a single info entry for printing it on screen.
 
 -spec format_info(info()) ->
-  iolist().
+  binary().
 
 format_info(Info) when is_list(Info); is_binary(Info) ->
   iolist_to_binary(Info);
 format_info(Info) when is_atom(Info) ->
   atom_to_binary(Info, unicode);
 format_info({K, V} = _Info) ->
-  [format_info(K), ": ", format_info(V)].
+  <<(format_info(K))/binary, ": ", (format_info(V))/binary>>.
 
 %% @doc Format term so it can be printed to screen.
 %%   Convenience wrapper for {@link io_lib:format/2}.