mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 03:00:17 +00:00
Use lists:flatmap/2
This commit is contained in:
parent
28c44cbc25
commit
1c1a32b8ba
1 changed files with 6 additions and 6 deletions
|
@ -179,14 +179,14 @@ get_sources(Config) ->
|
||||||
end.
|
end.
|
||||||
|
|
||||||
expand_port_specs(Specs) ->
|
expand_port_specs(Specs) ->
|
||||||
lists:append(lists:map(fun({_, Target, FileSpecs}) ->
|
lists:flatmap(fun({_, Target, FileSpecs}) ->
|
||||||
expand_file_specs(Target, FileSpecs);
|
expand_file_specs(Target, FileSpecs);
|
||||||
({Target, FileSpecs}) ->
|
({Target, FileSpecs}) ->
|
||||||
expand_file_specs(Target, FileSpecs)
|
expand_file_specs(Target, FileSpecs)
|
||||||
end, filter_port_specs(Specs))).
|
end, filter_port_specs(Specs)).
|
||||||
|
|
||||||
expand_file_specs(Target, FileSpecs) ->
|
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].
|
[{Target, Src} || Src <- Sources].
|
||||||
|
|
||||||
filter_port_specs(Specs) ->
|
filter_port_specs(Specs) ->
|
||||||
|
|
Loading…
Reference in a new issue