mirror of
https://github.com/correl/rebar.git
synced 2024-11-14 11:09:35 +00:00
Remove useless compile/3
Its case statement is noop.
This commit is contained in:
parent
eb79622903
commit
f61ca47b23
1 changed files with 2 additions and 13 deletions
|
@ -129,21 +129,10 @@ remove_common_path1([Part | RestFilename], [Part | RestPath]) ->
|
|||
remove_common_path1(FilenameParts, _) ->
|
||||
filename:join(FilenameParts).
|
||||
|
||||
|
||||
compile(Unit, Config, CompileFn) ->
|
||||
case CompileFn(Unit, Config) of
|
||||
ok ->
|
||||
ok;
|
||||
skipped ->
|
||||
skipped;
|
||||
Error ->
|
||||
Error
|
||||
end.
|
||||
|
||||
compile_each([], _Config, _CompileFn) ->
|
||||
ok;
|
||||
compile_each([Unit | Rest], Config, CompileFn) ->
|
||||
case compile(Unit, Config, CompileFn) of
|
||||
case CompileFn(Unit, Config) of
|
||||
ok ->
|
||||
?CONSOLE("Compiled ~s\n", [unit_source(Unit)]);
|
||||
{ok, Warnings} ->
|
||||
|
@ -224,7 +213,7 @@ compile_worker(QueuePid, Config, CompileFn) ->
|
|||
QueuePid ! {next, self()},
|
||||
receive
|
||||
{compile, Source} ->
|
||||
case catch(compile(Source, Config, CompileFn)) of
|
||||
case catch(CompileFn(Source, Config)) of
|
||||
{ok, Ws} ->
|
||||
QueuePid ! {compiled, Source, Ws},
|
||||
compile_worker(QueuePid, Config, CompileFn);
|
||||
|
|
Loading…
Reference in a new issue