Skip to content

Commit

Permalink
Use let to split up long expression
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Hu <alanh@ccs.neu.edu>
  • Loading branch information
alan-j-hu committed Sep 16, 2020
1 parent 78959b5 commit 8c239b3
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/dune_engine/scheduler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -711,15 +711,16 @@ end = struct

let run_and_cleanup t f =
let res = run t f in
Console.Status_line.set
(Fun.const
( match res with
| Error Files_changed ->
Some
(Pp.seq
(Pp.tag User_message.Style.Error (Pp.verbatim "Had errors"))
(Pp.verbatim ", killing current build..."))
| _ -> None ));
let opt =
match res with
| Error Files_changed ->
Some
(Pp.seq
(Pp.tag User_message.Style.Error (Pp.verbatim "Had errors"))
(Pp.verbatim ", killing current build..."))
| _ -> None
in
Console.Status_line.set (Fun.const opt);
match kill_and_wait_for_all_processes t () with
| Got_signal -> Error Got_signal
| Ok -> res
Expand Down

0 comments on commit 8c239b3

Please sign in to comment.