summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2014-05-30 07:52:14 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2014-05-30 07:52:14 -0500
commit7936f9e873beb5887a8a81c24bdcbe09de3dd337 (patch)
treee084056bcb3e30955abbc7b19dbf46ded03e3029
parent6fda9b8f8854e21e10acbb0f635f8247049a8c38 (diff)
parent949d56552729067fdb99c0ced58d104674ed5aae (diff)
Merge pull request #290 from tuncer/erlc-case-of
erlc: replace if expression with case of
-rw-r--r--src/rebar_erlc_compiler.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index d63ac3e..f7753c7 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -409,17 +409,17 @@ init_erlcinfo(Config, Erls) ->
update_erlcinfo(G, Source, Dirs) ->
case digraph:vertex(G, Source) of
{_, LastUpdated} ->
- LastModified = filelib:last_modified(Source),
- if LastModified == 0 ->
+ case filelib:last_modified(Source) of
+ 0 ->
%% The file doesn't exist anymore,
%% erase it from the graph.
%% All the edges will be erased automatically.
digraph:del_vertex(G, Source),
modified;
- LastUpdated < LastModified ->
+ LastModified when LastUpdated < LastModified ->
modify_erlcinfo(G, Source, Dirs),
modified;
- true ->
+ _ ->
unmodified
end;
false ->