summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2012-02-07 20:11:50 +0100
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2012-02-07 20:11:50 +0100
commit1c1a32b8bae3130671eec3298f6ae07bf41d734d (patch)
tree3bd9894f7d4e11983312ab9446bccf6a7eacd752
parent28c44cbc25768038f950c0e205575fe5d2c5bae7 (diff)
Use lists:flatmap/2
-rw-r--r--src/rebar_port_compiler.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl
index ef62c4c..4acbf36 100644
--- a/src/rebar_port_compiler.erl
+++ b/src/rebar_port_compiler.erl
@@ -179,14 +179,14 @@ get_sources(Config) ->
end.
expand_port_specs(Specs) ->
- lists:append(lists:map(fun({_, Target, FileSpecs}) ->
- expand_file_specs(Target, FileSpecs);
- ({Target, FileSpecs}) ->
- expand_file_specs(Target, FileSpecs)
- end, filter_port_specs(Specs))).
+ lists:flatmap(fun({_, Target, FileSpecs}) ->
+ expand_file_specs(Target, FileSpecs);
+ ({Target, FileSpecs}) ->
+ expand_file_specs(Target, FileSpecs)
+ end, filter_port_specs(Specs)).
expand_file_specs(Target, FileSpecs) ->
- Sources = lists:append([filelib:wildcard(FS) || FS <- FileSpecs]),
+ Sources = lists:flatmap(fun filelib:wildcard/1, FileSpecs),
[{Target, Src} || Src <- Sources].
filter_port_specs(Specs) ->