Skip to content

Commit

Permalink
Simplify pattern match that did same thing with result in both branches
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
  • Loading branch information
rgrinberg committed Dec 26, 2018
1 parent 1f78434 commit 0b0f703
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/build_system.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1164,11 +1164,7 @@ let get_file_spec_other t fn =
let dir = Path.parent_exn fn in
if Path.is_in_build_dir dir then
load_dir t ~dir;
match Path.Table.find t.files fn with
| Some file ->
Fiber.return (Some file)
| None ->
Fiber.return None
Fiber.return (Path.Table.find t.files fn)

and get_file_spec t path =
match Path.Table.find t.files path with
Expand Down

0 comments on commit 0b0f703

Please sign in to comment.