Skip to content

Commit

Permalink
refactor: remove extra binding in only_packages (#9157)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Nov 13, 2023
1 parent 031aa51 commit e83217a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dune_rules/only_packages.ml
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,16 @@ let stanzas_in_dir dir =
if Path.Build.is_root dir
then Memo.return None
else
let* dune_file = Dune_load.Dune_files.in_dir dir in
match dune_file with
Dune_load.Dune_files.in_dir dir
>>= function
| None -> Memo.return None
| Some dune_file ->
let* only_packages = Memo.Lazy.force conf in
let stanzas =
match only_packages with
let+ stanzas =
Memo.Lazy.force conf
>>| function
| None -> dune_file.stanzas
| Some visible_pkgs ->
filter_out_stanzas_from_hidden_packages ~visible_pkgs dune_file.stanzas
in
Memo.return (Some { dune_file with stanzas })
Some { dune_file with stanzas }
;;

0 comments on commit e83217a

Please sign in to comment.