Skip to content

Commit 36f3f7f

Browse files
committed
address comments
1 parent 73040c4 commit 36f3f7f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/ocaml/typing/short_paths.ml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,8 +1775,7 @@ module Basis = struct
17751775
Rev_deps.extend_up_to t.rev_deps t.next_dep;
17761776
List.iter
17771777
(fun { name; depends; alias_depends; _ } ->
1778-
String_map.find_opt name.Global_module.Name.head t.assignment
1779-
|> Option.iter (fun index ->
1778+
let index = String_map.find name.Global_module.Name.head t.assignment in
17801779
List.iter
17811780
(fun dep_name ->
17821781
let dep_index = String_map.find dep_name t.assignment in
@@ -1786,23 +1785,22 @@ module Basis = struct
17861785
(fun dep_name ->
17871786
let dep_index = String_map.find dep_name t.assignment in
17881787
Rev_deps.add_alias t.rev_deps ~source:dep_index ~target:index)
1789-
alias_depends))
1788+
alias_depends)
17901789
loads
17911790

17921791
let update_shortest t additions loads =
17931792
let components =
1794-
List.filter_map
1793+
List.map
17951794
(fun { name; desc; visibility=load_visibility; deprecated; _ } ->
1796-
String_map.find_opt name.Global_module.Name.head t.assignment
1797-
|> Option.map (fun index ->
1795+
let index = String_map.find name.Global_module.Name.head t.assignment in
17981796
let origin = Origin.Dependency index in
17991797
let id = Ident.global name in
18001798
let component_visibility : Desc.visibility =
18011799
match load_visibility, deprecated with
18021800
| Hidden, _ | _, Deprecated -> Hidden
18031801
| Visible, Not_deprecated -> Visible
18041802
in
1805-
Component.Module(origin, id, desc, Component.Global, component_visibility)))
1803+
Component.Module(origin, id, desc, Component.Global, component_visibility))
18061804
loads
18071805
in
18081806
let components =

0 commit comments

Comments
 (0)