summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2012-06-30 23:17:22 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2012-06-30 23:17:22 +0200
commitfd0697239d52716ea0611bcbe33735840462217e (patch)
treefd2a9a0946f634d44ab5e9252c79dc0c4872776f /src
parent385e3f09bab11de51c8fa90ce34b8d43c6779f12 (diff)
Use lists:foreach because result is ignored
Diffstat (limited to 'src')
-rw-r--r--src/rebar_templater.erl21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl
index ce06173..603942a 100644
--- a/src/rebar_templater.erl
+++ b/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.