Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use lists:foreach because result is ignored

  • Loading branch information...
commit fd0697239d52716ea0611bcbe33735840462217e 1 parent 385e3f0
@tuncer authored
Showing with 11 additions and 10 deletions.
  1. +11 −10 src/rebar_templater.erl
View
21 src/rebar_templater.erl
@@ -62,16 +62,17 @@
%% Build a list of available templates
AvailTemplates = find_disk_templates() ++ find_escript_templates(),
?CONSOLE("Available templates:\n", []),
- _ = [begin
- BaseName = filename:basename(F, ".template"),
- TemplateTerms = consult(load_file(Type, F)),
- {_, VarList} = lists:keyfind(variables, 1, TemplateTerms),
- Vars = lists:foldl(fun({V,_}, Acc) ->
- [atom_to_list(V) | Acc]
- end, [], VarList),
- ?CONSOLE(" * ~s: ~s (~p) (variables: ~p)\n",
- [BaseName, F, Type, string:join(Vars, ", ")])
- end || {Type, F} <- AvailTemplates],
+ lists:foreach(
+ fun({Type, F}) ->
+ BaseName = filename:basename(F, ".template"),
+ TemplateTerms = consult(load_file(Type, F)),
+ {_, VarList} = lists:keyfind(variables, 1, TemplateTerms),
+ Vars = lists:foldl(fun({V,_}, Acc) ->
+ [atom_to_list(V) | Acc]
+ end, [], VarList),
+ ?CONSOLE(" * ~s: ~s (~p) (variables: ~p)\n",
+ [BaseName, F, Type, string:join(Vars, ", ")])
+ end, AvailTemplates),
ok.
Please sign in to comment.
Something went wrong with that request. Please try again.